/* TED Emergency — design e sviluppo del tema: FB Engineering */
/*!
 * TED Emergency — stile principale
 * I valori (colori, font, misure, animazioni) arrivano come variabili CSS dal Personalizza.
 */

/* ============ Valori di riserva ============ */
:root {
	--ted-primary: #ff6a00;
	--ted-primary-2: #ffae00;
	--ted-on-primary: #000;
	--ted-bg: #000;
	--ted-bg-2: #0e0e0e;
	--ted-surface: #171717;
	--ted-text: #f5f5f2;
	--ted-muted: #a1a1a1;
	--ted-line: #2b2b2b;
	--ted-font-heading: 'Barlow Condensed', system-ui, sans-serif;
	--ted-font-body: 'Barlow', system-ui, sans-serif;
	--ted-font-digits: 'Chakra Petch', system-ui, sans-serif;
	--ted-fs-base: 17px;
	--ted-lh: 1.65;
	--ted-b-weight: 400;
	--ted-h-scale: 1;
	--ted-h-weight: 800;
	--ted-h-ls: .01em;
	--ted-h-lh: 1;
	--ted-h-transform: uppercase;
	--ted-menu-fs: 15px;
	--ted-container: 1240px;
	--ted-section-py: 128px;
	--ted-radius: 14px;
	--ted-btn-radius: 4px;
	--ted-header-h: 86px;
	--ted-logo-h: 52px;
	--ted-anim-dur: 950ms;
	--ted-anim-dist: 60px;
	--ted-anim-ease: cubic-bezier(.22, 1, .36, 1);
	--ted-marquee-speed: 32s;
	--ted-ecg-speed: 2.6s;
	--ted-hero-overlay: .72;
	--ted-hero-h: 100vh;
	--ted-hero-size: 22vw;
	--ted-map-h: 520px;
	--ted-led: #ff8c1a;
	--ted-nixie: #ff6a1a;
	--ted-flap-bg: #151515;
	--ted-flap-text: #f4efe2;
	--ted-stats-cols: 3;
	--ted-beacon: #2266ff;
	--ted-logo-speed: 1;
	--ted-logo-glow: .8;
	--ted-ui-transform: uppercase;
	--ted-ecg-len: 240;
	--ted-ecg-color: #3dff8b;
	--ted-ecg-blip: #ffffff;
	--ted-ecg-w: 3px;

	--ted-glow: color-mix(in srgb, var(--ted-primary) 45%, transparent);
	--ted-soft: color-mix(in srgb, var(--ted-primary) 12%, transparent);
	--ted-pad: clamp(1.2rem, 4vw, 2.5rem);
	--ted-py: clamp(calc(var(--ted-section-py) * .5), 10vw, var(--ted-section-py));
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--ted-header-h) * .8);
	-webkit-text-size-adjust: 100%;
	font-size: var(--ted-fs-base);
}

body {
	margin: 0;
	background: var(--ted-bg);
	color: var(--ted-text);
	font-family: var(--ted-font-body);
	font-size: 1rem;
	font-weight: var(--ted-b-weight);
	line-height: var(--ted-lh);
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

body.menu-open, body.ted-lb-open { overflow: hidden; }

img, video, iframe, svg { max-width: 100%; }
img, video { height: auto; display: block; }

a { color: var(--ted-primary); text-decoration: none; transition: color .25s; }
a:hover { color: var(--ted-primary-2); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--ted-font-heading);
	font-weight: var(--ted-h-weight);
	letter-spacing: var(--ted-h-ls);
	text-transform: var(--ted-h-transform);
	line-height: var(--ted-h-lh);
	color: var(--ted-text);
	margin: 0 0 .5em;
	text-wrap: balance;
}
h1 { font-size: calc(clamp(2.6rem, 6.5vw, 5.4rem) * var(--ted-h-scale)); }
h2 { font-size: calc(clamp(2.2rem, 5.2vw, 4.4rem) * var(--ted-h-scale)); }
h3 { font-size: calc(clamp(1.35rem, 2.3vw, 1.9rem) * var(--ted-h-scale)); }
h4 { font-size: calc(1.25rem * var(--ted-h-scale)); }
h5, h6 { font-size: calc(1.05rem * var(--ted-h-scale)); }

p { margin: 0 0 1.1em; }
strong, b { font-weight: 700; }

::selection { background: var(--ted-primary); color: var(--ted-on-primary); }
:focus-visible { outline: 2px solid var(--ted-primary); outline-offset: 3px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ted-skip {
	position: fixed;
	left: 1rem; top: -4rem;
	z-index: 10000;
	padding: .8rem 1.2rem;
	background: var(--ted-primary);
	color: var(--ted-on-primary);
	font-weight: 700;
	border-radius: var(--ted-btn-radius);
	transition: top .2s;
}
.ted-skip:focus { top: 1rem; color: var(--ted-on-primary); }

.ted-container {
	width: min(100% - 2 * var(--ted-pad), var(--ted-container));
	margin-inline: auto;
}

.ted-icon { width: 1.25em; height: 1.25em; flex: none; }

/* ============ Trame di sfondo ============ */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}
.ted-texture-grid::before {
	background-image:
		linear-gradient(color-mix(in srgb, var(--ted-text) 4%, transparent) 1px, transparent 1px),
		linear-gradient(90deg, color-mix(in srgb, var(--ted-text) 4%, transparent) 1px, transparent 1px);
	background-size: 72px 72px;
	-webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
	mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
}
.ted-texture-dots::before {
	background-image: radial-gradient(color-mix(in srgb, var(--ted-text) 10%, transparent) 1px, transparent 1.5px);
	background-size: 26px 26px;
	-webkit-mask-image: linear-gradient(#000, transparent 90%);
	mask-image: linear-gradient(#000, transparent 90%);
}
.ted-texture-noise::before {
	opacity: .07;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.ted-main, .ted-footer { position: relative; z-index: 1; }

/* ============ Pulsanti e link ============ */
.ted-btn {
	--ted-btn-fill: var(--ted-text);
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .65em;
	padding: 1em 1.8em;
	border: 2px solid var(--ted-primary);
	border-radius: var(--ted-btn-radius);
	background: var(--ted-primary);
	color: var(--ted-on-primary);
	font-family: var(--ted-font-heading);
	font-size: .95rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: var(--ted-ui-transform);
	line-height: 1.1;
	cursor: pointer;
	overflow: hidden;
	isolation: isolate;
	transition: color .35s, border-color .35s, box-shadow .35s, transform .35s var(--ted-anim-ease);
	box-shadow: 0 10px 30px -12px var(--ted-glow);
}
.ted-btn::before {
	content: "";
	position: absolute;
	inset: -2px;
	z-index: -1;
	background: var(--ted-btn-fill);
	transform: translateX(-102%) skewX(-12deg);
	transform-origin: left;
	transition: transform .5s var(--ted-anim-ease);
}
.ted-btn:hover { color: var(--ted-bg); border-color: var(--ted-btn-fill); box-shadow: 0 16px 40px -12px var(--ted-glow); }
.ted-btn:hover::before { transform: translateX(0) skewX(0); }
.ted-btn .ted-icon { transition: transform .35s var(--ted-anim-ease); }
.ted-btn:hover .ted-icon { transform: translateX(4px); }

.ted-btn--ghost {
	--ted-btn-fill: var(--ted-primary);
	background: transparent;
	color: var(--ted-text);
	border-color: color-mix(in srgb, var(--ted-text) 35%, transparent);
	box-shadow: none;
}
.ted-btn--ghost:hover { color: var(--ted-on-primary); border-color: var(--ted-primary); }
.ted-btn--sm { padding: .75em 1.3em; font-size: .85rem; }

.ted-btn-outline .ted-btn:not(.ted-btn--ghost) { background: transparent; color: var(--ted-primary); --ted-btn-fill: var(--ted-primary); }
.ted-btn-outline .ted-btn:not(.ted-btn--ghost):hover { color: var(--ted-on-primary); border-color: var(--ted-primary); }
.ted-btn-gradient .ted-btn:not(.ted-btn--ghost) {
	background: linear-gradient(120deg, var(--ted-primary), var(--ted-primary-2), var(--ted-primary));
	background-size: 200% 100%;
	border-color: transparent;
	animation: ted-shift 6s linear infinite;
}

.ted-link {
	display: inline-flex;
	align-items: center;
	gap: .45em;
	font-family: var(--ted-font-heading);
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: var(--ted-ui-transform);
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
	transition: background-size .45s var(--ted-anim-ease), color .25s;
	padding-bottom: .15em;
}
.ted-link:hover { background-size: 100% 2px; }
.ted-link .ted-icon { transition: transform .35s var(--ted-anim-ease); }
.ted-link:hover .ted-icon { transform: translateX(5px); }

.ted-magnetic { transition: transform .35s var(--ted-anim-ease), color .35s, border-color .35s, box-shadow .35s; will-change: transform; }

/* ============ Preloader ============ */
.ted-preloader {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: grid;
	place-items: center;
	background: var(--ted-bg);
	transition: opacity .7s var(--ted-anim-ease), visibility .7s, clip-path .9s var(--ted-anim-ease);
	clip-path: inset(0 0 0 0);
}
.ted-loaded .ted-preloader { opacity: 0; visibility: hidden; clip-path: inset(0 0 100% 0); }
.ted-preloader__inner { width: min(78vw, 520px); text-align: center; }
.ted-preloader__ecg { width: 100%; height: 90px; }
.ted-preloader__word {
	display: block;
	margin-top: .6rem;
	font-family: var(--ted-font-heading);
	font-weight: var(--ted-h-weight);
	font-size: 1.1rem;
	letter-spacing: .6em;
	padding-left: .6em;
	color: var(--ted-muted);
	animation: ted-blink-soft 1.2s ease-in-out infinite;
}

/* ============ Tracciato ECG (riusato ovunque) ============ */
.ted-ecg { display: block; width: 100%; height: 100%; overflow: visible; }
.ted-ecg path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ted-ecg__base { stroke: color-mix(in srgb, var(--ted-primary) 35%, transparent); stroke-width: 2; }
.ted-ecg__under { display: none; }
.ted-ecg__blip {
	stroke: var(--ted-primary);
	stroke-width: 3;
	filter: drop-shadow(0 0 6px var(--ted-primary)) drop-shadow(0 0 14px var(--ted-glow));
}

/* ============ Barra di avanzamento e alone ============ */
.ted-progress {
	position: fixed;
	top: 0; left: 0; right: 0;
	height: 3px;
	z-index: 1100;
	transform: scaleX(0);
	transform-origin: 0 50%;
	background: linear-gradient(90deg, var(--ted-primary), var(--ted-primary-2));
	box-shadow: 0 0 12px var(--ted-glow);
	pointer-events: none;
}

.ted-cursor {
	position: fixed;
	left: 0; top: 0;
	width: 460px; height: 460px;
	margin: -230px 0 0 -230px;
	border-radius: 50%;
	background: radial-gradient(circle, color-mix(in srgb, var(--ted-primary) 16%, transparent), transparent 62%);
	pointer-events: none;
	z-index: 2;
	opacity: 0;
	transition: opacity .5s;
	mix-blend-mode: screen;
	will-change: transform;
}
.ted-cursor.is-on { opacity: 1; }
@media (hover: none) { .ted-cursor { display: none; } }

/* ============ Intestazione ============ */
.ted-header {
	position: relative;
	z-index: 1000;
	height: var(--ted-header-h);
	display: flex;
	align-items: center;
	background: color-mix(in srgb, var(--ted-bg) 82%, transparent);
	-webkit-backdrop-filter: blur(16px) saturate(140%);
	backdrop-filter: blur(16px) saturate(140%);
	border-bottom: 1px solid var(--ted-line);
	transition: height .4s var(--ted-anim-ease), background .4s, border-color .4s, transform .5s var(--ted-anim-ease);
}
.ted-header-fixed .ted-header { position: fixed; top: 0; left: 0; right: 0; }
.ted-header-fixed:not(.ted-header-over) .ted-main { padding-top: var(--ted-header-h); }
.ted-header-over:not(.ted-header-fixed) .ted-header { position: absolute; top: 0; left: 0; right: 0; }
.ted-header-over .ted-header:not(.is-scrolled) {
	background: transparent;
	border-color: transparent;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}
.ted-header.is-scrolled { height: calc(var(--ted-header-h) * .78); }
.ted-header.is-hidden { transform: translateY(-110%); }
.admin-bar.ted-header-fixed .ted-header { top: 32px; }
@media (max-width: 782px) { .admin-bar.ted-header-fixed .ted-header { top: 46px; } }

.ted-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.ted-header__actions { display: flex; align-items: center; gap: .8rem; }

.ted-brand { flex: none; position: relative; z-index: 2; }
.ted-brand img, .custom-logo { height: var(--ted-logo-h); width: auto; transition: height .4s var(--ted-anim-ease); }
.is-scrolled .ted-brand img { height: calc(var(--ted-logo-h) * .8); }
.ted-brand__text { display: flex; align-items: center; gap: .7rem; color: var(--ted-text); line-height: 1; }
.ted-brand__text:hover { color: var(--ted-text); }
.ted-brand__mark {
	font-family: var(--ted-font-heading);
	font-weight: var(--ted-h-weight);
	font-size: 2rem;
	letter-spacing: .04em;
	color: var(--ted-primary);
	padding-right: .7rem;
	border-right: 2px solid var(--ted-primary);
}
.ted-brand__sub {
	font-family: var(--ted-font-heading);
	font-weight: 600;
	font-size: .78rem;
	letter-spacing: .22em;
	text-transform: var(--ted-ui-transform);
	max-width: 11em;
	line-height: 1.25;
}

.ted-menu { list-style: none; display: flex; align-items: center; gap: .15rem; margin: 0; padding: 0; }
.ted-menu li { position: relative; }
.ted-menu a {
	position: relative;
	display: block;
	padding: .6em .95em;
	color: var(--ted-text);
	font-family: var(--ted-font-heading);
	font-size: var(--ted-menu-fs);
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: var(--ted-ui-transform);
}
.ted-menu a::after {
	content: "";
	position: absolute;
	left: .95em; right: .95em; bottom: .3em;
	height: 2px;
	background: var(--ted-primary);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform .4s var(--ted-anim-ease);
}
.ted-menu a:hover { color: var(--ted-text); }
.ted-menu a:hover::after,
.ted-menu .is-active > a::after,
.ted-menu .current-menu-item > a::after { transform: scaleX(1); transform-origin: left; }
.ted-menu .is-active > a, .ted-menu .current-menu-item > a { color: var(--ted-primary); }

.ted-menu .sub-menu {
	list-style: none;
	position: absolute;
	top: 100%; left: 0;
	min-width: 220px;
	margin: 0; padding: .5rem;
	background: var(--ted-surface);
	border: 1px solid var(--ted-line);
	border-radius: calc(var(--ted-radius) * .6);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity .3s, transform .3s var(--ted-anim-ease), visibility .3s;
}
.ted-menu li:hover > .sub-menu, .ted-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.ted-menu .sub-menu a::after { display: none; }

.ted-nav .ted-socials { display: none; }

.ted-burger {
	display: none;
	position: relative;
	z-index: 2;
	width: 48px; height: 48px;
	padding: 0;
	border: 1px solid var(--ted-line);
	border-radius: var(--ted-btn-radius);
	background: transparent;
	cursor: pointer;
}
.ted-burger__line {
	position: absolute;
	left: 13px; right: 13px;
	height: 2px;
	background: var(--ted-text);
	transition: transform .45s var(--ted-anim-ease), opacity .3s, top .45s var(--ted-anim-ease);
}
.ted-burger__line:nth-of-type(2) { top: 16px; }
.ted-burger__line:nth-of-type(3) { top: 23px; right: 20px; }
.ted-burger__line:nth-of-type(4) { top: 30px; }
.menu-open .ted-burger__line:nth-of-type(2) { top: 23px; transform: rotate(45deg); }
.menu-open .ted-burger__line:nth-of-type(3) { opacity: 0; transform: translateX(10px); }
.menu-open .ted-burger__line:nth-of-type(4) { top: 23px; transform: rotate(-45deg); }

/* ============ Hero ============ */
.ted-hero {
	position: relative;
	isolation: isolate;
	min-height: var(--ted-hero-h);
	display: flex;
	align-items: center;
	padding: calc(var(--ted-header-h) + 3rem) 0 7rem;
	overflow: hidden;
	text-align: center;
}
.ted-hero--left { text-align: left; }

.ted-hero__media {
	position: absolute;
	inset: -12% 0;
	z-index: -4;
	background: radial-gradient(ellipse at 50% 120%, color-mix(in srgb, var(--ted-primary) 28%, transparent), transparent 60%) center / cover no-repeat;
	background-size: cover;
	background-position: center;
	will-change: transform;
}
.ted-hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ted-hero__video--embed {
	inset: auto;
	left: 50%; top: 50%;
	width: max(100%, 177.78vh);
	height: max(100%, 56.25vw);
	transform: translate(-50%, -50%);
	border: 0;
	pointer-events: none;
}
.ted-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: -3;
	background: var(--ted-bg);
	opacity: var(--ted-hero-overlay);
}
.ted-hero__overlay::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 55%, var(--ted-bg));
}
.ted-hero__grid {
	position: absolute;
	inset: 0;
	z-index: -2;
	background-image:
		linear-gradient(color-mix(in srgb, var(--ted-primary) 9%, transparent) 1px, transparent 1px),
		linear-gradient(90deg, color-mix(in srgb, var(--ted-primary) 9%, transparent) 1px, transparent 1px);
	background-size: 64px 64px;
	transform: perspective(700px) rotateX(58deg) translateY(28%) scale(2);
	transform-origin: 50% 100%;
	-webkit-mask-image: linear-gradient(to top, #000 10%, transparent 60%);
	mask-image: linear-gradient(to top, #000 10%, transparent 60%);
	animation: ted-grid-run 3s linear infinite;
}

.ted-siren {
	position: absolute;
	z-index: -1;
	width: 70vmax; height: 70vmax;
	border-radius: 50%;
	filter: blur(70px);
	opacity: .05;
	pointer-events: none;
	animation: ted-siren 2.4s ease-in-out infinite;
}
.ted-siren--a { left: -35vmax; top: -30vmax; background: radial-gradient(circle, var(--ted-primary), transparent 65%); }
.ted-siren--b { right: -35vmax; top: -25vmax; background: radial-gradient(circle, var(--ted-primary-2), transparent 65%); animation-delay: 1.2s; }

.ted-embers { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

.ted-hero__inner { position: relative; }
.ted-hero__logo { margin: 0 auto 1.4rem; width: clamp(90px, 12vw, 150px); }
.ted-hero--left .ted-hero__logo { margin-left: 0; }
.ted-hero__logo img { width: 100%; filter: drop-shadow(0 10px 30px var(--ted-glow)); }

.ted-hero__kicker {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: .6rem 1.4rem;
	margin: 0 0 1rem;
	padding: .55rem 1.1rem;
	border: 1px solid color-mix(in srgb, var(--ted-primary) 40%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, var(--ted-bg) 55%, transparent);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	font-family: var(--ted-font-heading);
	font-size: .92rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: var(--ted-ui-transform);
	color: var(--ted-text);
}
.ted-hero__place { display: inline-flex; align-items: center; gap: .4em; color: var(--ted-primary); }
.ted-live {
	position: relative;
	width: 10px; height: 10px;
	border-radius: 50%;
	background: var(--ted-primary);
	box-shadow: 0 0 10px var(--ted-primary);
}
.ted-live::after {
	content: "";
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 2px solid var(--ted-primary);
	animation: ted-ping 1.6s ease-out infinite;
}

.ted-hero__title {
	position: relative;
	margin: 0 auto;
	font-size: inherit;
	line-height: 1;
	text-transform: none;
	letter-spacing: 0;
}
.ted-hero__word {
	position: relative;
	display: inline-block;
	font-size: calc(clamp(3rem, var(--ted-hero-size), 40rem) * var(--ted-h-scale));
	font-weight: var(--ted-h-weight);
	line-height: .82;
	letter-spacing: var(--ted-h-ls);
	text-transform: var(--ted-h-transform);
	color: transparent;
	-webkit-text-fill-color: transparent;
	-webkit-text-stroke: 2px var(--ted-primary);
	padding: .04em .02em 0;
}
.ted-hero__word::after {
	content: attr(data-text);
	position: absolute;
	inset: 0;
	padding: inherit;
	background: linear-gradient(180deg, var(--ted-primary-2) 0%, var(--ted-primary) 55%, color-mix(in srgb, var(--ted-primary) 70%, #000) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-stroke: 0;
	clip-path: inset(100% 0 0 0);
	animation: ted-fill 1.6s var(--ted-anim-ease) .8s forwards;
	animation-play-state: paused;
	filter: drop-shadow(0 0 40px var(--ted-glow));
}
.ted-loaded .ted-hero__word::after,
.ted-fallback .ted-hero__word::after { animation-play-state: running; }
.ted-hero--beat .ted-hero__word { animation: ted-beat var(--ted-ecg-speed) ease-in-out 2.6s infinite; }

.ted-hero__mark {
	position: relative;
	display: inline-block;
	max-width: 100%;
	line-height: 0;
}
.ted-hero__mark > .ted-logo, .ted-hero__mark > .ted-hero__word { padding-left: calc(.02em + max(var(--ted-h-ls), 0em)); }
.ted-hero__ecg {
	position: absolute;
	left: calc(50% - var(--ted-ecg-len) * .5%);
	width: calc(var(--ted-ecg-len) * 1%);
	max-width: none;
	top: var(--ted-ecg-y, 48%);
	height: 42%;
	max-height: 160px;
	transform: translateY(-50%);
	z-index: 3;
	pointer-events: none;
	overflow: visible;
}
.ted-hero__ecg .ted-ecg__base {
	stroke: var(--ted-ecg-color);
	stroke-width: var(--ted-ecg-w);
}
.ted-hero__ecg .ted-ecg__blip {
	stroke: var(--ted-ecg-blip);
	stroke-width: calc(var(--ted-ecg-w) + 1.5px);
	filter: drop-shadow(0 0 4px var(--ted-ecg-blip)) drop-shadow(0 0 12px var(--ted-ecg-color));
}
/* Colori rapidi della linea */
.ted-ecg-p-green .ted-hero__ecg { --ted-ecg-color: #3dff8b; }
.ted-ecg-p-white .ted-hero__ecg { --ted-ecg-color: #ffffff; }
.ted-ecg-p-red .ted-hero__ecg { --ted-ecg-color: #ff2f45; }
.ted-ecg-p-white .ted-hero__ecg .ted-ecg__blip { stroke: var(--ted-primary-2); }

/* Effetto monitor: testina luminosa */
.ted-ecg__head { display: none; }
.ted-ecg--monitor .ted-ecg__head {
	display: inline;
	fill: #fff;
	filter: drop-shadow(0 0 3px var(--ted-ecg-blip, #fff)) drop-shadow(0 0 8px var(--ted-ecg-color, #fff)) drop-shadow(0 0 18px var(--ted-ecg-color, #fff));
}

/* Come far risaltare la linea sulle lettere arancioni */
.ted-ecg-c-halo .ted-hero__ecg .ted-ecg__under,
.ted-ecg-c-both .ted-hero__ecg .ted-ecg__under {
	display: inline;
	stroke: rgba(0, 0, 0, .85);
	stroke-width: calc(var(--ted-ecg-w) + 7px);
	filter: blur(1.5px);
}
.ted-ecg-c-glow .ted-hero__ecg .ted-ecg__base,
.ted-ecg-c-both .ted-hero__ecg .ted-ecg__base {
	filter: drop-shadow(0 0 3px var(--ted-ecg-color)) drop-shadow(0 0 10px var(--ted-ecg-color));
}
.ted-ecg-c-band .ted-hero__ecg {
	background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .62) 22%, rgba(0, 0, 0, .62) 78%, transparent 100%),
		repeating-linear-gradient(90deg, color-mix(in srgb, var(--ted-ecg-color) 14%, transparent) 0 1px, transparent 1px 24px);
	border-radius: 6px;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ted-js .ted-hero__ecg {
	clip-path: inset(-100% 100% -100% -2%);
	animation: ted-ecg-reveal 2.2s var(--ted-anim-ease) .4s forwards;
	animation-play-state: paused;
}
.ted-loaded .ted-hero__ecg, .ted-fallback .ted-hero__ecg { animation-play-state: running; }
.ted-anim-off .ted-hero__ecg { animation: none; clip-path: none; }
@keyframes ted-ecg-reveal { to { clip-path: inset(-100% -2% -100% -2%); } }

.ted-hero__subtitle {
	display: block;
	margin-top: .35em;
	font-size: calc(clamp(1.1rem, 2.8vw, 2.3rem) * var(--ted-h-scale));
	font-weight: 500;
	letter-spacing: .32em;
	text-transform: var(--ted-ui-transform);
	color: var(--ted-text);
	padding-left: .32em;
}
.ted-hero__subtitle b { color: var(--ted-primary); font-weight: 800; }

.ted-hero__text {
	max-width: 54ch;
	margin: 1.4rem auto 0;
	color: color-mix(in srgb, var(--ted-text) 78%, transparent);
	font-size: clamp(1rem, 1.4vw, 1.15rem);
}
.ted-hero--left .ted-hero__text, .ted-hero--left .ted-hero__title { margin-left: 0; }
.ted-hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2rem; }
.ted-hero--left .ted-hero__actions, .ted-hero--left .ted-cd__units, .ted-hero--left .ted-hero__kicker { justify-content: flex-start; }

.ted-scroll {
	position: absolute;
	left: 0; right: 0; bottom: 1.8rem;
	width: 26px;
	margin-inline: auto;
	color: var(--ted-text);
}
.ted-scroll__mouse {
	display: block;
	width: 26px; height: 42px;
	border: 2px solid color-mix(in srgb, var(--ted-text) 50%, transparent);
	border-radius: 14px;
	position: relative;
}
.ted-scroll__mouse span {
	position: absolute;
	left: 50%; top: 8px;
	width: 4px; height: 8px;
	margin-left: -2px;
	border-radius: 2px;
	background: var(--ted-primary);
	animation: ted-wheel 1.8s ease-in-out infinite;
}

/* Ingresso dell'hero */
.ted-js .ted-intro {
	opacity: 0;
	transform: translate3d(0, 40px, 0);
	transition: opacity 1s var(--ted-anim-ease), transform 1.1s var(--ted-anim-ease), filter 1s var(--ted-anim-ease);
	transition-delay: calc(var(--i, 0) * 130ms + 150ms);
}
.ted-js .ted-intro-zoom .ted-intro { transform: scale(.88); }
.ted-js .ted-intro-blur .ted-intro { transform: none; filter: blur(14px); }
.ted-js .ted-intro-fade .ted-intro { transform: none; }
.ted-loaded .ted-intro, .ted-fallback .ted-intro { opacity: 1 !important; transform: none !important; filter: none !important; }

/* ============ Countdown ============ */
.ted-hero__cd { margin-top: 2.2rem; }
.ted-cd__title {
	margin: 0 0 1rem;
	font-family: var(--ted-font-heading);
	font-size: .95rem;
	font-weight: 700;
	letter-spacing: .3em;
	text-transform: var(--ted-ui-transform);
	color: var(--ted-primary);
}
.ted-cd__units { display: flex; justify-content: center; align-items: flex-start; gap: clamp(.35rem, 1.5vw, 1rem); }
.ted-cd__unit { display: flex; flex-direction: column; align-items: center; gap: .55rem; }
.ted-cd__value {
	position: relative;
	display: grid;
	place-items: center;
	min-width: 2.3ch;
	font-family: var(--ted-font-digits);
	font-size: clamp(2rem, 6vw, 4.3rem);
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	color: var(--ted-text);
}
.ted-cd__num { position: relative; display: block; }
.ted-cd__label {
	font-family: var(--ted-font-heading);
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .24em;
	text-transform: var(--ted-ui-transform);
	color: var(--ted-muted);
}
.ted-cd__sep {
	font-family: var(--ted-font-digits);
	font-size: clamp(2rem, 6vw, 4.3rem);
	line-height: 1.15;
	color: var(--ted-primary);
	animation: ted-blink 1s steps(1) infinite;
}
.ted-cd__ring { display: none; }
.ted-cd__ended {
	display: none;
	margin: 0;
	font-family: var(--ted-font-heading);
	font-size: calc(clamp(1.3rem, 3vw, 2.1rem) * var(--ted-h-scale));
	font-weight: var(--ted-h-weight);
	text-transform: var(--ted-h-transform);
	color: var(--ted-primary);
}
.ted-cd.is-ended .ted-cd__units { display: none; }
.ted-cd.is-ended .ted-cd__ended { display: block; }
.ted-cd .is-tick .ted-cd__num { animation: ted-tick .45s var(--ted-anim-ease); }

/* Tabellone a palette */
.ted-cd--flip .ted-cd__value {
	padding: .2em .3em;
	border-radius: calc(var(--ted-radius) * .5 + 2px);
	background: linear-gradient(180deg, var(--ted-surface) 0 50%, color-mix(in srgb, var(--ted-surface) 72%, #000) 50% 100%);
	box-shadow: inset 0 0 0 1px var(--ted-line), inset 0 1px 0 color-mix(in srgb, var(--ted-text) 10%, transparent), 0 20px 34px -18px #000;
}
.ted-cd--flip .ted-cd__value::after {
	content: "";
	position: absolute;
	left: 0; right: 0; top: 50%;
	height: 2px;
	background: var(--ted-bg);
}
.ted-cd--flip .ted-cd__value::before {
	content: "";
	position: absolute;
	left: -3px; right: -3px; top: calc(50% - 5px);
	height: 10px;
	background: linear-gradient(90deg, var(--ted-line) 0 3px, transparent 3px calc(100% - 3px), var(--ted-line) calc(100% - 3px));
}
.ted-cd--flip .is-tick .ted-cd__num { animation: none; }
.ted-cd--flip .is-tick .ted-cd__value { animation: ted-flip .55s var(--ted-anim-ease); }

/* Display digitale */
.ted-cd--segment .ted-cd__value {
	padding: .18em .32em;
	border-radius: 6px;
	background: #000 repeating-linear-gradient(0deg, color-mix(in srgb, var(--ted-primary) 6%, transparent) 0 1px, transparent 1px 3px);
	border: 1px solid color-mix(in srgb, var(--ted-primary) 35%, transparent);
	color: var(--ted-primary);
	text-shadow: 0 0 8px var(--ted-primary), 0 0 22px var(--ted-glow);
	font-style: italic;
	box-shadow: inset 0 0 30px color-mix(in srgb, var(--ted-primary) 10%, transparent);
}

/* Anelli luminosi */
.ted-cd--ring .ted-cd__sep { display: none; }
.ted-cd--ring .ted-cd__value {
	width: clamp(4.4rem, 15vw, 7.6rem);
	aspect-ratio: 1;
	font-size: clamp(1.4rem, 4.4vw, 2.6rem);
}
.ted-cd--ring .ted-cd__ring {
	display: block;
	position: absolute;
	inset: 0;
	width: 100%; height: 100%;
	transform: rotate(-90deg);
	overflow: visible;
}
.ted-cd__ring circle { fill: none; stroke-width: 4; }
.ted-cd__ring-bg { stroke: var(--ted-line); }
.ted-cd__ring-fg {
	stroke: var(--ted-primary);
	stroke-dasharray: 283;
	stroke-dashoffset: 283;
	stroke-linecap: round;
	transition: stroke-dashoffset .9s var(--ted-anim-ease);
	filter: drop-shadow(0 0 5px var(--ted-primary));
}

/* Minimale */
.ted-cd--minimal .ted-cd__value { padding-bottom: .12em; border-bottom: 3px solid var(--ted-primary); }
.ted-cd--minimal .ted-cd__sep { color: var(--ted-line); }

/* ============ Nastro scorrevole ============ */
.ted-ticker {
	position: relative;
	z-index: 3;
	margin: -1.5rem 0;
	padding: 1.05rem 0;
	overflow: hidden;
	background: var(--ted-primary);
	color: var(--ted-on-primary);
	box-shadow: 0 20px 60px -20px var(--ted-glow);
}
.ted-ticker--skew { transform: rotate(-2deg) scale(1.04); }
.ted-ticker__track { display: flex; width: max-content; animation: ted-marquee var(--ted-marquee-speed) linear infinite; }
.ted-ticker--reverse .ted-ticker__track { animation-direction: reverse; }
.ted-ticker:hover .ted-ticker__track { animation-play-state: paused; }
.ted-ticker__group { display: flex; align-items: center; flex: none; }
.ted-ticker__item {
	padding: 0 1.4rem;
	font-family: var(--ted-font-heading);
	font-size: calc(clamp(1.2rem, 2.4vw, 2rem) * var(--ted-h-scale));
	font-weight: var(--ted-h-weight);
	letter-spacing: .04em;
	text-transform: var(--ted-h-transform);
	white-space: nowrap;
}
.ted-ticker__sep { display: inline-flex; }
.ted-ticker__sep .ted-icon { width: 1.3rem; height: 1.3rem; fill: var(--ted-on-primary); stroke: none; animation: ted-spin 6s linear infinite; }

/* ============ Sezioni ============ */
.ted-section { position: relative; padding-block: var(--ted-py); }
.ted-section--alt { background: var(--ted-bg-2); }
.ted-section--page { padding-top: calc(var(--ted-py) * .6); }

.ted-heading { max-width: 62ch; margin-bottom: clamp(2rem, 5vw, 3.8rem); }
.ted-heading__title { margin-bottom: .3em; }
.ted-heading__intro { color: var(--ted-muted); font-size: 1.1rem; margin: 0; }
.ted-line {
	display: block;
	width: 72px; height: 4px;
	margin-bottom: 1.2rem;
	background: linear-gradient(90deg, var(--ted-primary), var(--ted-primary-2));
	box-shadow: 0 0 16px var(--ted-glow);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 1s var(--ted-anim-ease) .1s;
}
.ted-line.is-in, .ted-anim-off .ted-line, .ted-fallback .ted-line { transform: scaleX(1); }

/* Testo diviso */
.ted-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; }
.ted-char {
	display: inline-block;
	transform: translate3d(0, 110%, 0) rotate(6deg);
	opacity: 0;
	transition: transform .9s var(--ted-anim-ease), opacity .9s var(--ted-anim-ease);
	transition-delay: calc(var(--ci) * 28ms);
}
.ted-split.is-in .ted-char, .ted-fallback .ted-char { transform: none; opacity: 1; }
.ted-js .ted-split.ted-reveal[data-split] { opacity: 1; transform: none; filter: none; clip-path: none; }

/* ============ Animazioni allo scorrimento ============ */
.ted-js .ted-reveal {
	opacity: 0;
	transition:
		opacity var(--ted-anim-dur) var(--ted-anim-ease),
		transform var(--ted-anim-dur) var(--ted-anim-ease),
		filter var(--ted-anim-dur) var(--ted-anim-ease),
		clip-path var(--ted-anim-dur) var(--ted-anim-ease);
	transition-delay: var(--d, 0ms);
}
.ted-js .ted-reveal[data-anim="fade-up"] { transform: translate3d(0, var(--ted-anim-dist), 0); }
.ted-js .ted-reveal[data-anim="fade-down"] { transform: translate3d(0, calc(var(--ted-anim-dist) * -1), 0); }
.ted-js .ted-reveal[data-anim="fade-left"] { transform: translate3d(var(--ted-anim-dist), 0, 0); }
.ted-js .ted-reveal[data-anim="fade-right"] { transform: translate3d(calc(var(--ted-anim-dist) * -1), 0, 0); }
.ted-js .ted-reveal[data-anim="zoom-in"] { transform: scale(.84); }
.ted-js .ted-reveal[data-anim="zoom-out"] { transform: scale(1.14); }
.ted-js .ted-reveal[data-anim="flip-up"] { transform: perspective(1000px) rotateX(38deg) translate3d(0, calc(var(--ted-anim-dist) * .5), 0); transform-origin: 50% 100%; }
.ted-js .ted-reveal[data-anim="blur-in"] { filter: blur(16px); transform: scale(1.05); }
.ted-js .ted-reveal[data-anim="clip-up"] { opacity: 1; clip-path: inset(100% 0 0 0); transform: translate3d(0, 24px, 0); }
.ted-js .ted-reveal[data-anim="skew-up"] { transform: translate3d(0, var(--ted-anim-dist), 0) skewY(7deg); transform-origin: 0 100%; }
.ted-js .ted-reveal[data-anim="none"] { opacity: 1; transform: none; }
.ted-js .ted-reveal.is-in { opacity: 1; transform: none; filter: none; clip-path: inset(0 0 0 0); }

.ted-anim-off .ted-reveal, .ted-fallback .ted-reveal,
.ted-anim-off .ted-intro, .ted-anim-off .ted-char {
	opacity: 1 !important;
	transform: none !important;
	filter: none !important;
	clip-path: none !important;
	transition: none !important;
}
.ted-anim-off .ted-hero__word::after { animation: none; clip-path: none; }

/* ============ Separatori ============ */
.ted-divider { position: relative; z-index: 2; overflow: hidden; pointer-events: none; }
.ted-divider--chevron {
	height: 22px;
	background: repeating-linear-gradient(-45deg, var(--ted-primary) 0 16px, var(--ted-bg) 16px 32px);
	background-size: 45.25px 45.25px;
	border-block: 2px solid var(--ted-primary);
	animation: ted-stripes 1.6s linear infinite;
}
.ted-divider--ecg { height: 90px; }
.ted-divider--ecg .ted-ecg__base { stroke: color-mix(in srgb, var(--ted-primary) 28%, transparent); }
.ted-divider--diagonal {
	height: clamp(50px, 7vw, 100px);
	background: linear-gradient(to bottom right, transparent calc(50% - 2px), var(--ted-primary) calc(50% - 1px), var(--ted-primary-2) calc(50% + 1px), transparent calc(50% + 2px));
	filter: drop-shadow(0 0 8px var(--ted-glow));
}
.ted-divider--wave { height: 60px; }
.ted-divider--wave svg { width: 200%; height: 100%; animation: ted-wave 8s linear infinite; }
.ted-divider--wave path { fill: none; stroke: var(--ted-primary); stroke-width: 2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px var(--ted-glow)); }
.ted-js .ted-divider { opacity: 0; transition: opacity 1s; }
.ted-divider.is-in, .ted-anim-off .ted-divider, .ted-fallback .ted-divider { opacity: 1; }
.ted-static-dividers .ted-divider, .ted-static-dividers .ted-divider svg, .ted-static-dividers .ted-divider .ted-ecg__blip { animation: none; }

/* ============ Cos'è il TED ============ */
.ted-about__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.ted-about__body { color: color-mix(in srgb, var(--ted-text) 82%, transparent); font-size: 1.08rem; max-width: 60ch; }
.ted-about__body p:first-child { font-size: 1.28em; line-height: 1.45; color: var(--ted-text); }
.ted-about__media { position: relative; }
.ted-about__frame {
	position: relative;
	aspect-ratio: 4 / 5;
	border-radius: var(--ted-radius);
	overflow: hidden;
	background: var(--ted-surface);
	box-shadow: 0 40px 80px -40px #000;
}
.ted-about__frame::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ted-text) 10%, transparent);
	pointer-events: none;
}
.ted-about__media::before {
	content: "";
	position: absolute;
	inset: 1.4rem -1.4rem -1.4rem 1.4rem;
	border: 2px solid var(--ted-primary);
	border-radius: var(--ted-radius);
	z-index: -1;
}
.ted-about__img { position: absolute; inset: -10% 0; }
.ted-about__img img { width: 100%; height: 100%; object-fit: cover; }

.ted-placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: var(--ted-surface); overflow: hidden; }
.ted-placeholder__stripes {
	position: absolute;
	left: -20%; right: -20%;
	bottom: 18%;
	height: 70px;
	background: repeating-linear-gradient(-45deg, var(--ted-primary) 0 22px, transparent 22px 44px);
	transform: rotate(-8deg);
	opacity: .9;
}
.ted-placeholder__icon { width: 38%; height: auto; color: var(--ted-primary); stroke-width: 1; filter: drop-shadow(0 0 24px var(--ted-glow)); animation: ted-float 6s ease-in-out infinite; }
.ted-placeholder__ecg { position: absolute; left: 0; right: 0; top: 18%; height: 80px; }

.ted-badge {
	position: absolute;
	left: -2.6rem; bottom: -2.6rem;
	width: clamp(120px, 14vw, 170px);
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--ted-bg);
	display: grid;
	place-items: center;
	box-shadow: 0 0 0 1px var(--ted-line), 0 20px 50px -20px #000;
}
.ted-badge__ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: ted-spin 22s linear infinite; }
.ted-badge__ring text {
	fill: var(--ted-text);
	font-family: var(--ted-font-heading);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: var(--ted-ui-transform);
}
.ted-badge__core {
	width: 44%;
	aspect-ratio: 1;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--ted-primary);
	color: var(--ted-on-primary);
	box-shadow: 0 0 30px var(--ted-glow);
}
.ted-badge__core .ted-icon { width: 55%; height: 55%; fill: currentColor; stroke: none; }

.ted-pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: clamp(4rem, 8vw, 6.5rem); }
.ted-pillar {
	--mx: 50%; --my: 0%;
	position: relative;
	height: 100%;
	padding: clamp(1.6rem, 3vw, 2.4rem);
	border: 1px solid var(--ted-line);
	border-radius: var(--ted-radius);
	background:
		radial-gradient(400px circle at var(--mx) var(--my), color-mix(in srgb, var(--ted-primary) 14%, transparent), transparent 45%),
		var(--ted-surface);
	overflow: hidden;
	transition: transform .25s ease-out, border-color .35s;
	transform-style: preserve-3d;
}
.ted-pillar::before {
	content: "";
	position: absolute;
	left: 0; top: 0;
	width: 100%; height: 3px;
	background: linear-gradient(90deg, var(--ted-primary), var(--ted-primary-2));
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .6s var(--ted-anim-ease);
}
.ted-pillar:hover { border-color: color-mix(in srgb, var(--ted-primary) 50%, transparent); }
.ted-pillar:hover::before { transform: scaleX(1); }
.ted-pillar__icon {
	display: grid;
	place-items: center;
	width: 58px; height: 58px;
	margin-bottom: 1.4rem;
	border-radius: calc(var(--ted-radius) * .7);
	background: var(--ted-soft);
	color: var(--ted-primary);
	transform: translateZ(30px);
	transition: background .35s, color .35s, transform .35s var(--ted-anim-ease);
}
.ted-pillar__icon .ted-icon { width: 28px; height: 28px; }
.ted-pillar:hover .ted-pillar__icon { background: var(--ted-primary); color: var(--ted-on-primary); transform: translateZ(30px) rotate(-8deg) scale(1.06); }
.ted-pillar__title { transform: translateZ(20px); }
.ted-pillar__text { margin: 0; color: var(--ted-muted); }

/* ============ Numeri ============ */
.ted-stats__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.ted-stat { padding: 1rem clamp(1rem, 3vw, 2.5rem); border-left: 1px solid var(--ted-line); position: relative; }
.ted-stat::before {
	content: "";
	position: absolute;
	left: -1px; top: 0;
	width: 2px; height: 0;
	background: var(--ted-primary);
	box-shadow: 0 0 12px var(--ted-glow);
	transition: height 1.2s var(--ted-anim-ease) calc(var(--d, 0ms) + .3s);
}
.ted-stat.is-in::before, .ted-anim-off .ted-stat::before { height: 100%; }
.ted-stat__value {
	margin: 0;
	font-family: var(--ted-font-heading);
	font-size: calc(clamp(3.6rem, 8.5vw, 7.5rem) * var(--ted-h-scale));
	font-weight: var(--ted-h-weight);
	line-height: .95;
	background: linear-gradient(180deg, var(--ted-text) 20%, var(--ted-primary) 130%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-variant-numeric: tabular-nums;
}
.ted-stat__suffix { color: var(--ted-primary); -webkit-text-fill-color: var(--ted-primary); font-size: .5em; margin-left: .08em; }
.ted-stat__label {
	margin: .6rem 0 0;
	font-family: var(--ted-font-heading);
	font-size: .92rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: var(--ted-ui-transform);
	color: var(--ted-muted);
}

/* ============ Programma ============ */
.ted-tabs {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	gap: .2rem;
	margin-bottom: clamp(2rem, 4vw, 3.2rem);
	border-bottom: 1px solid var(--ted-line);
}
.ted-tab {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: .15rem;
	padding: .9rem 1.4rem 1.1rem;
	border: 0;
	background: none;
	color: var(--ted-muted);
	cursor: pointer;
	text-align: left;
	transition: color .3s;
}
.ted-tab__label {
	font-family: var(--ted-font-heading);
	font-size: calc(clamp(1.2rem, 2.2vw, 1.7rem) * var(--ted-h-scale));
	font-weight: var(--ted-h-weight);
	text-transform: var(--ted-h-transform);
	letter-spacing: var(--ted-h-ls);
	line-height: 1.1;
}
.ted-tab__tag { font-size: .78rem; letter-spacing: .18em; text-transform: var(--ted-ui-transform); }
.ted-tab:hover { color: var(--ted-text); }
.ted-tab[aria-selected="true"] { color: var(--ted-text); }
.ted-tab[aria-selected="true"] .ted-tab__tag { color: var(--ted-primary); }
.ted-tabs__ink {
	position: absolute;
	bottom: -2px;
	left: 0;
	height: 3px;
	width: 0;
	background: var(--ted-primary);
	box-shadow: 0 0 14px var(--ted-glow);
	transition: left .55s var(--ted-anim-ease), width .55s var(--ted-anim-ease);
}

.ted-day { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.ted-day[hidden] { display: none; }
.ted-program--stack .ted-day + .ted-day { margin-top: clamp(3rem, 6vw, 5rem); padding-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--ted-line); }
.ted-program--columns .ted-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.5rem; }
.ted-program--columns .ted-day {
	grid-template-columns: 1fr;
	gap: 1.5rem;
	padding: clamp(1.4rem, 3vw, 2rem);
	border: 1px solid var(--ted-line);
	border-radius: var(--ted-radius);
	background: var(--ted-surface);
}
.ted-program--columns .ted-day__media { order: -1; }
.ted-program--columns .ted-day__card { min-height: 170px; }

.ted-day__title { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.ted-day__title small { font-size: .45em; letter-spacing: .2em; color: var(--ted-primary); }

.ted-timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 2.4rem; }
.ted-timeline::before, .ted-timeline::after {
	content: "";
	position: absolute;
	left: 7px; top: .6rem;
	width: 2px;
}
.ted-timeline::before { bottom: .6rem; background: var(--ted-line); }
.ted-timeline::after {
	height: calc(var(--tl, 0) * (100% - 1.2rem));
	background: linear-gradient(var(--ted-primary-2), var(--ted-primary));
	box-shadow: 0 0 12px var(--ted-glow);
	transition: height .15s linear;
}
.ted-anim-off .ted-timeline::after { height: calc(100% - 1.2rem); }

.ted-event {
	position: relative;
	display: grid;
	grid-template-columns: 5.2rem 1fr;
	gap: 1rem;
	align-items: baseline;
	padding: .85rem 1rem;
	margin-bottom: .45rem;
	border-radius: calc(var(--ted-radius) * .6);
	transition: background .3s;
}
.ted-event:hover { background: var(--ted-soft); }
.ted-event::before {
	content: "";
	position: absolute;
	left: calc(-2.4rem + 1px);
	top: 1.2rem;
	width: 14px; height: 14px;
	border-radius: 50%;
	background: var(--ted-bg);
	border: 2px solid var(--ted-muted);
	transition: border-color .5s, background .5s, box-shadow .5s;
	transition-delay: calc(var(--d, 0ms) + 200ms);
}
.ted-event.is-in::before, .ted-anim-off .ted-event::before { border-color: var(--ted-primary); background: var(--ted-primary); box-shadow: 0 0 0 5px var(--ted-soft); }
.ted-event__time {
	font-family: var(--ted-font-digits);
	font-weight: 700;
	font-size: 1.15rem;
	color: var(--ted-primary);
	font-variant-numeric: tabular-nums;
}
.ted-event__title { font-size: 1.08rem; color: var(--ted-text); }
.ted-day.is-entering .ted-event.is-in { animation: ted-rise .6s var(--ted-anim-ease) both; animation-delay: calc(var(--i, 0) * 60ms); }

.ted-day__media { position: sticky; top: calc(var(--ted-header-h) + 1.5rem); }
.ted-day__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--ted-radius); }
.ted-day__card {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 360px;
	padding: 2rem;
	border-radius: var(--ted-radius);
	overflow: hidden;
	background:
		radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--ted-primary) 30%, transparent), transparent 55%),
		var(--ted-surface);
	border: 1px solid var(--ted-line);
}
.ted-day__big {
	position: absolute;
	left: 1.5rem; top: 1rem;
	right: 1rem;
	font-family: var(--ted-font-heading);
	font-size: clamp(2.5rem, 6vw, 5rem);
	font-weight: var(--ted-h-weight);
	line-height: .9;
	text-transform: var(--ted-ui-transform);
	color: transparent;
	-webkit-text-stroke: 1.5px color-mix(in srgb, var(--ted-text) 25%, transparent);
}
.ted-day__count { position: relative; font-family: var(--ted-font-digits); font-size: clamp(3.5rem, 7vw, 5.5rem); font-weight: 700; line-height: 1; color: var(--ted-primary); }
.ted-day__count-label { position: relative; font-family: var(--ted-font-heading); letter-spacing: .2em; text-transform: var(--ted-ui-transform); color: var(--ted-muted); }
.ted-day__ecg { position: absolute; left: 0; right: 0; top: 50%; height: 70px; opacity: .8; }

/* ============ Galleria ============ */
.ted-gallery { display: grid; gap: .8rem; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(150px, 17vw, 250px); grid-auto-flow: dense; }
.ted-gallery--grid .ted-gallery__item:nth-child(6n + 1) { grid-column: span 2; grid-row: span 2; }
.ted-gallery--grid .ted-gallery__item:nth-child(6n + 4) { grid-column: span 2; }
.ted-gallery--masonry { display: block; columns: 3 260px; column-gap: .8rem; }
.ted-gallery--masonry .ted-gallery__item { margin-bottom: .8rem; break-inside: avoid; }
.ted-gallery--masonry .ted-gallery__item img { height: auto; }
.ted-gallery--strip {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 1rem;
	scrollbar-color: var(--ted-primary) var(--ted-line);
}
.ted-gallery--strip .ted-gallery__item { flex: 0 0 min(80%, 480px); aspect-ratio: 4 / 3; scroll-snap-align: start; }

.ted-gallery__item { position: relative; display: block; overflow: hidden; border-radius: var(--ted-radius); background: var(--ted-surface); }
.ted-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ted-anim-ease), filter .7s; }
.ted-gallery-bw .ted-gallery__item img { filter: grayscale(1) contrast(1.1); }
.ted-gallery__item::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, color-mix(in srgb, var(--ted-primary) 60%, transparent), transparent 55%);
	opacity: 0;
	transition: opacity .5s;
}
.ted-gallery__zoom {
	position: absolute;
	left: 50%; top: 50%;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 58px; height: 58px;
	margin: -29px 0 0 -29px;
	border-radius: 50%;
	background: var(--ted-primary);
	color: var(--ted-on-primary);
	transform: scale(0) rotate(-90deg);
	transition: transform .5s var(--ted-anim-ease);
}
.ted-gallery__item:hover img, .ted-gallery__item:focus-visible img { transform: scale(1.08); filter: none; }
.ted-gallery__item:hover::after, .ted-gallery__item:focus-visible::after { opacity: 1; }
.ted-gallery__item:hover .ted-gallery__zoom, .ted-gallery__item:focus-visible .ted-gallery__zoom { transform: scale(1) rotate(0); }

.ted-lightbox {
	position: fixed;
	inset: 0;
	z-index: 5000;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 1rem;
	padding: 3rem 1rem;
	background: color-mix(in srgb, var(--ted-bg) 94%, transparent);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	opacity: 0;
	transition: opacity .3s;
}
.ted-lightbox.is-open { opacity: 1; }
.ted-lightbox[hidden] { display: none; }
.ted-lightbox__fig { margin: 0; text-align: center; }
.ted-lightbox__fig img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: var(--ted-radius); box-shadow: 0 30px 80px -30px #000; }
.ted-lightbox.is-swap img { animation: ted-pop .45s var(--ted-anim-ease); }
.ted-lightbox figcaption { margin-top: 1rem; font-family: var(--ted-font-digits); color: var(--ted-muted); letter-spacing: .1em; }
.ted-lightbox__close, .ted-lightbox__nav {
	width: 52px; height: 52px;
	border-radius: 50%;
	border: 1px solid var(--ted-line);
	background: var(--ted-surface);
	color: var(--ted-text);
	font-size: 1.8rem;
	line-height: 1;
	cursor: pointer;
	transition: background .3s, color .3s, transform .3s;
}
.ted-lightbox__close { position: absolute; top: 1rem; right: 1rem; }
.ted-lightbox__close:hover, .ted-lightbox__nav:hover { background: var(--ted-primary); color: var(--ted-on-primary); transform: scale(1.08); }

/* ============ Card e contenuti ============ */
.ted-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.4rem; }
.ted-card {
	--mx: 50%; --my: 0%;
	height: 100%;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--ted-line);
	border-radius: var(--ted-radius);
	overflow: hidden;
	background: radial-gradient(420px circle at var(--mx) var(--my), var(--ted-soft), transparent 45%), var(--ted-surface);
	transition: transform .25s ease-out, border-color .35s;
}
.ted-card:hover { border-color: color-mix(in srgb, var(--ted-primary) 45%, transparent); }
.ted-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ted-bg-2); }
.ted-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ted-anim-ease); }
.ted-card:hover .ted-card__media img { transform: scale(1.06); }
.ted-card__ph { display: grid; place-items: center; height: 100%; padding: 0 1rem; }
.ted-card__ph .ted-ecg { height: 70px; }
.ted-card__body { padding: 1.5rem; }
.ted-card__date { font-family: var(--ted-font-digits); font-size: .85rem; color: var(--ted-primary); }
.ted-card__title { margin: .4rem 0 .6rem; font-size: calc(1.45rem * var(--ted-h-scale)); }
.ted-card__title a { color: var(--ted-text); }
.ted-card__title a:hover { color: var(--ted-primary); }
.ted-card__excerpt { color: var(--ted-muted); }
.ted-card__excerpt p { margin: 0; }

.ted-pagination { margin-top: 3rem; }
.ted-pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.ted-pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 46px; height: 46px;
	padding: 0 .8rem;
	border: 1px solid var(--ted-line);
	border-radius: var(--ted-btn-radius);
	color: var(--ted-text);
	font-family: var(--ted-font-digits);
}
.ted-pagination .page-numbers.current, .ted-pagination .page-numbers:hover { background: var(--ted-primary); border-color: var(--ted-primary); color: var(--ted-on-primary); }

.ted-page-hero {
	position: relative;
	overflow: hidden;
	padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 6vw, 5rem);
	border-bottom: 1px solid var(--ted-line);
}
.ted-header-over .ted-page-hero { padding-top: calc(var(--ted-header-h) + 4rem); }
.ted-page-hero__title { max-width: 20ch; margin: 0; }
.ted-page-hero__meta { font-family: var(--ted-font-heading); letter-spacing: .14em; text-transform: var(--ted-ui-transform); color: var(--ted-primary); }
.ted-page-hero__meta a { color: var(--ted-text); }
.ted-page-hero__ecg { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; opacity: .8; }
.ted-page-hero .ted-siren { opacity: .12; animation-duration: 4s; }

.ted-prose { max-width: 780px; }
.ted-prose > * { margin-top: 0; }
.ted-prose h2 { font-size: calc(clamp(1.8rem, 3.6vw, 2.8rem) * var(--ted-h-scale)); margin-top: 1.6em; }
.ted-prose h3 { margin-top: 1.4em; }
.ted-prose a:not(.wp-block-button__link):not(.ted-btn) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.ted-prose ul, .ted-prose ol { padding-left: 1.3em; }
.ted-prose li { margin-bottom: .4em; }
.ted-prose li::marker { color: var(--ted-primary); }
.ted-prose blockquote, .wp-block-quote {
	margin: 2rem 0;
	padding: 1rem 0 1rem 1.6rem;
	border-left: 4px solid var(--ted-primary);
	font-size: 1.2em;
}
.ted-prose img { border-radius: var(--ted-radius); }
.ted-prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.ted-prose th, .ted-prose td { padding: .7rem 1rem; border-bottom: 1px solid var(--ted-line); text-align: left; }
.ted-prose th { font-family: var(--ted-font-heading); text-transform: var(--ted-ui-transform); letter-spacing: .08em; color: var(--ted-primary); }
.ted-prose code, .ted-prose pre { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; background: var(--ted-surface); border-radius: 6px; }
.ted-prose code { padding: .15em .4em; }
.ted-prose pre { padding: 1.2rem; overflow-x: auto; }
.ted-prose hr { border: 0; height: 2px; background: var(--ted-line); margin: 3rem 0; }
.ted-entry > .alignwide { max-width: min(100vw - 2 * var(--ted-pad), var(--ted-container)); margin-left: 50%; transform: translateX(-50%); width: min(100vw - 2 * var(--ted-pad), var(--ted-container)); }
.ted-entry > .alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.ted-entry__thumb { margin: 0 0 2.5rem; }
.ted-fullwidth > *:not(.alignfull):not(.alignwide) { width: min(100% - 2 * var(--ted-pad), 780px); margin-inline: auto; }
.ted-fullwidth > .alignwide { width: min(100% - 2 * var(--ted-pad), var(--ted-container)); margin-inline: auto; }

.wp-block-button__link, .wp-element-button {
	background: var(--ted-primary);
	color: var(--ted-on-primary);
	border-radius: var(--ted-btn-radius);
	font-family: var(--ted-font-heading);
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: var(--ted-ui-transform);
	padding: .95em 1.7em;
	transition: background .3s, color .3s, transform .3s;
}
.wp-block-button__link:hover { background: var(--ted-text); color: var(--ted-bg); transform: translateY(-2px); }
.is-style-outline > .wp-block-button__link { background: transparent; color: var(--ted-primary); border: 2px solid currentColor; }

.alignleft { float: left; margin: .3rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; display: block; }
.wp-caption, .wp-block-image figcaption, figcaption { font-size: .88rem; color: var(--ted-muted); }
.sticky, .bypostauthor, .gallery-caption { position: relative; }

.has-ted-primary-color { color: var(--ted-primary) !important; }
.has-ted-primary-background-color { background-color: var(--ted-primary) !important; }
.has-ted-primary-2-color { color: var(--ted-primary-2) !important; }
.has-ted-primary-2-background-color { background-color: var(--ted-primary-2) !important; }
.has-ted-bg-color { color: var(--ted-bg) !important; }
.has-ted-bg-background-color { background-color: var(--ted-bg) !important; }
.has-ted-surface-background-color { background-color: var(--ted-surface) !important; }
.has-ted-text-color { color: var(--ted-text) !important; }

.ted-tags a {
	display: inline-block;
	margin: 0 .3rem .3rem 0;
	padding: .3rem .8rem;
	border: 1px solid var(--ted-line);
	border-radius: 999px;
	color: var(--ted-text);
	font-size: .85rem;
	text-decoration: none !important;
}
.ted-postnav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--ted-line); }
.ted-postnav a { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--ted-font-heading); font-weight: 700; text-transform: var(--ted-ui-transform); color: var(--ted-text); text-decoration: none !important; }
.ted-postnav a:hover { color: var(--ted-primary); }
.ted-postnav__next { margin-left: auto; text-align: right; }

/* ============ Contatti ============ */
.ted-contact__grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.ted-contact__list { list-style: none; margin: 0 0 2rem; padding: 0; }
.ted-contact__list li { display: flex; align-items: center; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--ted-line); }
.ted-contact__list a { color: var(--ted-text); }
.ted-contact__list a:hover { color: var(--ted-primary); }
.ted-contact__icon {
	display: grid;
	place-items: center;
	width: 44px; height: 44px;
	flex: none;
	border-radius: 50%;
	background: var(--ted-soft);
	color: var(--ted-primary);
}

.ted-contact__form {
	position: relative;
	padding: clamp(1.5rem, 4vw, 2.8rem);
	border: 1px solid var(--ted-line);
	border-radius: var(--ted-radius);
	background: var(--ted-surface);
	overflow: hidden;
}
.ted-contact__form::before {
	content: "";
	position: absolute;
	left: 0; right: 0; top: 0;
	height: 6px;
	background: repeating-linear-gradient(-45deg, var(--ted-primary) 0 10px, transparent 10px 20px);
}
.ted-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.ted-field--full { grid-column: 1 / -1; }
.ted-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.ted-field { position: relative; }
.ted-field input, .ted-field textarea, .ted-captcha input {
	width: 100%;
	padding: 1.45rem 1rem .6rem;
	border: 1px solid var(--ted-line);
	border-radius: calc(var(--ted-radius) * .55);
	background: var(--ted-bg);
	color: var(--ted-text);
	font: inherit;
	transition: border-color .3s, box-shadow .3s;
}
.ted-field textarea { resize: vertical; min-height: 150px; }
.ted-field label {
	position: absolute;
	left: 1rem; top: 1.05rem;
	color: var(--ted-muted);
	pointer-events: none;
	transform-origin: left top;
	transition: transform .3s var(--ted-anim-ease), color .3s;
}
.ted-field input:focus, .ted-field textarea:focus, .ted-captcha input:focus {
	outline: none;
	border-color: var(--ted-primary);
	box-shadow: 0 0 0 4px var(--ted-soft);
}
.ted-field input:focus + label, .ted-field input:not(:placeholder-shown) + label,
.ted-field textarea:focus + label, .ted-field textarea:not(:placeholder-shown) + label {
	transform: translateY(-.62rem) scale(.74);
	color: var(--ted-primary);
}

.ted-check { display: flex; gap: .8rem; align-items: flex-start; font-size: .88rem; color: var(--ted-muted); }
.ted-check input {
	appearance: none;
	-webkit-appearance: none;
	flex: none;
	width: 22px; height: 22px;
	margin: .1rem 0 0;
	border: 2px solid var(--ted-line);
	border-radius: 5px;
	background: var(--ted-bg);
	cursor: pointer;
	display: grid;
	place-items: center;
	transition: background .25s, border-color .25s;
}
.ted-check input::after { content: ""; width: 6px; height: 11px; border: solid var(--ted-on-primary); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); transition: transform .25s var(--ted-anim-ease); margin-top: -3px; }
.ted-check input:checked { background: var(--ted-primary); border-color: var(--ted-primary); }
.ted-check input:checked::after { transform: rotate(45deg) scale(1); }
.ted-check a { text-decoration: underline; }

.ted-form__foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: .5rem; }
.ted-captcha { display: flex; align-items: center; gap: .7rem; font-family: var(--ted-font-digits); font-size: 1.15rem; }
.ted-captcha input { width: 5.5rem; padding: .7rem .8rem; text-align: center; font-family: var(--ted-font-digits); }

.ted-notice { margin-bottom: 1.4rem; padding: 1rem 1.2rem; border-radius: calc(var(--ted-radius) * .55); border-left: 4px solid; animation: ted-rise .6s var(--ted-anim-ease); }
.ted-notice--ok { border-color: #2ecc71; background: color-mix(in srgb, #2ecc71 12%, transparent); }
.ted-notice--err { border-color: #ff3b3b; background: color-mix(in srgb, #ff3b3b 12%, transparent); }

.ted-socials { display: flex; flex-wrap: wrap; gap: .6rem; }
.ted-social {
	display: grid;
	place-items: center;
	width: 46px; height: 46px;
	border: 1px solid var(--ted-line);
	border-radius: 50%;
	color: var(--ted-text);
	transition: background .3s, color .3s, border-color .3s, transform .35s var(--ted-anim-ease);
}
.ted-social:hover { background: var(--ted-primary); border-color: var(--ted-primary); color: var(--ted-on-primary); }

/* ============ Mappa ============ */
.ted-map-section { position: relative; }
.ted-map { position: relative; height: var(--ted-map-h); overflow: hidden; background: var(--ted-bg-2); }
.ted-map__frame, .ted-map__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ted-map--dark iframe { filter: grayscale(1) invert(.92) contrast(.9) brightness(.9); }
.ted-map--dark .ted-map__frame::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--ted-primary);
	mix-blend-mode: color;
	opacity: .35;
	pointer-events: none;
}
.ted-map__consent {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.2rem;
	padding: 2rem;
	text-align: center;
	color: var(--ted-muted);
	background:
		linear-gradient(color-mix(in srgb, var(--ted-primary) 7%, transparent) 1px, transparent 1px) 0 0 / 48px 48px,
		linear-gradient(90deg, color-mix(in srgb, var(--ted-primary) 7%, transparent) 1px, transparent 1px) 0 0 / 48px 48px,
		var(--ted-bg-2);
	background-size: cover;
	transition: opacity .6s, visibility .6s;
}
.ted-map__consent[style] { background-size: cover; background-position: center; box-shadow: inset 0 0 0 100vmax color-mix(in srgb, var(--ted-bg) 75%, transparent); }
.ted-map.is-loaded .ted-map__consent { opacity: 0; visibility: hidden; }
.ted-map__consent p { max-width: 42ch; margin: 0; }
.ted-map__radar { position: relative; width: 90px; height: 90px; }
.ted-map__radar span {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 2px solid var(--ted-primary);
	animation: ted-radar 2.4s ease-out infinite;
}
.ted-map__radar span:nth-child(2) { animation-delay: .8s; }
.ted-map__radar span:nth-child(3) { animation-delay: 1.6s; }
.ted-map__radar::after {
	content: "";
	position: absolute;
	left: 50%; top: 50%;
	width: 16px; height: 16px;
	margin: -8px 0 0 -8px;
	border-radius: 50%;
	background: var(--ted-primary);
	box-shadow: 0 0 18px var(--ted-primary);
}
.ted-map__card {
	position: absolute;
	left: max(var(--ted-pad), calc((100% - var(--ted-container)) / 2));
	bottom: 2rem;
	z-index: 3;
	max-width: 360px;
	padding: 1.6rem 1.8rem;
	border: 1px solid var(--ted-line);
	border-left: 4px solid var(--ted-primary);
	border-radius: calc(var(--ted-radius) * .7);
	background: color-mix(in srgb, var(--ted-bg) 88%, transparent);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}
.ted-map__title { font-size: calc(1.8rem * var(--ted-h-scale)); margin-bottom: .3em; }
.ted-map__card p { color: var(--ted-muted); margin-bottom: .8rem; }

/* ============ Piè di pagina ============ */
.ted-footer { overflow: hidden; background: var(--ted-bg-2); padding: clamp(4rem, 8vw, 6rem) 0 2rem; }
.ted-footer__stripe {
	position: absolute;
	left: 0; right: 0; top: 0;
	height: 8px;
	background: repeating-linear-gradient(-45deg, var(--ted-primary) 0 14px, var(--ted-bg) 14px 28px);
	background-size: 39.6px 39.6px;
	animation: ted-stripes 1.6s linear infinite;
}
.ted-static-dividers .ted-footer__stripe { animation: none; }
.ted-footer__mega {
	position: absolute;
	left: 50%; bottom: -6vw;
	margin-left: -50vw;
	width: 100vw;
	text-align: center;
	font-family: var(--ted-font-heading);
	font-weight: var(--ted-h-weight);
	font-size: 34vw;
	line-height: .8;
	color: transparent;
	-webkit-text-stroke: 1px color-mix(in srgb, var(--ted-primary) 22%, transparent);
	pointer-events: none;
	user-select: none;
}
.ted-footer__grid { position: relative; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; }
.ted-footer__text { color: var(--ted-muted); max-width: 42ch; margin: 1.2rem 0 1.5rem; }
.ted-footer__menu { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2rem; }
.ted-footer__menu a {
	display: inline-block;
	padding: .35rem 0;
	color: var(--ted-text);
	font-family: var(--ted-font-heading);
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: var(--ted-ui-transform);
	transition: color .3s, transform .3s var(--ted-anim-ease);
}
.ted-footer__menu a:hover { color: var(--ted-primary); transform: translateX(6px); }
.ted-widget__title { font-size: 1.1rem; color: var(--ted-primary); }
.ted-footer__bottom {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem;
	margin-top: clamp(3rem, 8vw, 7rem);
	padding-top: 1.5rem;
	border-top: 1px solid var(--ted-line);
	font-size: .85rem;
	color: var(--ted-muted);
}
.ted-footer__bottom p { margin: 0; }

.ted-top {
	position: fixed;
	right: 1.4rem; bottom: 1.4rem;
	z-index: 900;
	display: grid;
	place-items: center;
	width: 56px; height: 56px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ted-surface);
	color: var(--ted-primary);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(20px) scale(.8);
	transition: opacity .4s, visibility .4s, transform .4s var(--ted-anim-ease), background .3s, color .3s;
	box-shadow: 0 10px 30px -10px #000;
}
.ted-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.ted-top:hover { background: var(--ted-primary); color: var(--ted-on-primary); }
.ted-top__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ted-top__ring circle { fill: none; stroke: var(--ted-line); stroke-width: 3; }
.ted-top__ring .ted-top__fg { stroke: var(--ted-primary); stroke-dasharray: 157; stroke-dashoffset: 157; stroke-linecap: round; }
.ted-top .ted-icon { position: relative; }

/* ============ 404 e commenti ============ */
.ted-404 { min-height: 80vh; display: grid; place-items: center; text-align: center; padding: calc(var(--ted-header-h) + 3rem) 0 4rem; }
.ted-404__code {
	margin: 0;
	font-family: var(--ted-font-heading);
	font-weight: var(--ted-h-weight);
	font-size: clamp(7rem, 26vw, 18rem);
	line-height: .85;
	color: transparent;
	-webkit-text-stroke: 2px var(--ted-primary);
	animation: ted-glitch 3s steps(1) infinite;
}
.ted-404__flat { width: 100%; height: 90px; margin: 1rem 0 2rem; }
.ted-404__flat path {
	fill: none;
	stroke: var(--ted-primary);
	stroke-width: 3;
	vector-effect: non-scaling-stroke;
	stroke-dasharray: 1000;
	stroke-dashoffset: 1000;
	filter: drop-shadow(0 0 6px var(--ted-primary));
	animation: ted-draw 3s var(--ted-anim-ease) .3s forwards;
}
.ted-comments { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--ted-line); }
.ted-comments__list { list-style: none; padding: 0; }
.ted-comments__list .children { list-style: none; padding-left: 1.5rem; }
.ted-comments .comment-body { padding: 1.2rem; margin-bottom: 1rem; background: var(--ted-surface); border-radius: var(--ted-radius); }
.ted-comments .avatar { border-radius: 50%; float: left; margin-right: 1rem; }
.comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea, .search-form .search-field {
	width: 100%;
	padding: .9rem 1rem;
	border: 1px solid var(--ted-line);
	border-radius: calc(var(--ted-radius) * .55);
	background: var(--ted-bg);
	color: var(--ted-text);
	font: inherit;
}
.comment-form .submit, .search-form .search-submit {
	padding: .95em 1.7em;
	border: 0;
	border-radius: var(--ted-btn-radius);
	background: var(--ted-primary);
	color: var(--ted-on-primary);
	font-family: var(--ted-font-heading);
	font-weight: 700;
	text-transform: var(--ted-ui-transform);
	letter-spacing: .08em;
	cursor: pointer;
}
.search-form { display: flex; gap: .6rem; }

/* ============ Keyframes ============ */
@keyframes ted-blip { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
@keyframes ted-draw { to { stroke-dashoffset: 0; } }
@keyframes ted-fill { to { clip-path: inset(0 0 0 0); } }
@keyframes ted-beat {
	0%, 100% { transform: scale(1); }
	8% { transform: scale(1.025); }
	14% { transform: scale(.995); }
	20% { transform: scale(1.015); }
	30% { transform: scale(1); }
}
@keyframes ted-siren { 0%, 100% { opacity: .04; } 15% { opacity: .42; } 30% { opacity: .08; } 45% { opacity: .32; } 60% { opacity: .05; } }
@keyframes ted-ping { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@keyframes ted-grid-run { from { background-position: 0 0, 0 0; } to { background-position: 0 64px, 0 0; } }
@keyframes ted-wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
@keyframes ted-blink { 50% { opacity: .15; } }
@keyframes ted-blink-soft { 50% { opacity: .35; } }
@keyframes ted-tick { from { transform: translateY(-35%); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes ted-flip {
	0% { transform: perspective(420px) rotateX(0); }
	45% { transform: perspective(420px) rotateX(-75deg); filter: brightness(1.7); }
	100% { transform: perspective(420px) rotateX(0); }
}
@keyframes ted-marquee { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
@keyframes ted-spin { to { transform: rotate(360deg); } }
@keyframes ted-stripes { from { background-position: 0 0; } to { background-position: 45.25px 0; } }
@keyframes ted-wave { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes ted-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(4deg); } }
@keyframes ted-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes ted-pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes ted-radar { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@keyframes ted-shift { to { background-position: 200% 0; } }
@keyframes ted-glitch {
	0%, 90%, 100% { transform: none; text-shadow: none; }
	92% { transform: translate(-4px, 2px); text-shadow: 4px 0 var(--ted-primary-2); }
	94% { transform: translate(4px, -2px); text-shadow: -4px 0 var(--ted-primary); }
	96% { transform: none; }
}

/* ============ Responsive ============ */
@media (max-width: 1080px) {
	.ted-burger { display: block; }
	.ted-nav {
		position: fixed;
		inset: 0;
		z-index: 1;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 2rem;
		padding: calc(var(--ted-header-h) + 1rem) 1.5rem 2rem;
		background:
			radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--ted-primary) 22%, transparent), transparent 50%),
			var(--ted-bg);
		clip-path: circle(0 at calc(100% - 3rem) 2.6rem);
		visibility: hidden;
		transition: clip-path .8s var(--ted-anim-ease), visibility .8s;
		overflow-y: auto;
	}
	.menu-open .ted-nav { clip-path: circle(150% at calc(100% - 3rem) 2.6rem); visibility: visible; }
	.ted-nav .ted-menu { flex-direction: column; gap: .2rem; text-align: center; }
	.ted-nav .ted-menu > li {
		opacity: 0;
		transform: translateY(30px);
		transition: opacity .6s var(--ted-anim-ease), transform .6s var(--ted-anim-ease);
	}
	.menu-open .ted-nav .ted-menu > li { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 70ms + 250ms); }
	.ted-nav .ted-menu a { font-size: calc(clamp(1.8rem, 7vw, 2.8rem) * var(--ted-h-scale)); font-weight: var(--ted-h-weight); letter-spacing: var(--ted-h-ls); text-transform: var(--ted-h-transform); }
	.ted-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; background: none; border: 0; }
	.ted-nav .sub-menu a { font-size: 1.1rem; }
	.ted-nav .ted-socials { display: flex; }
	.menu-open .ted-header { background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }

	.ted-about__grid, .ted-day, .ted-contact__grid { grid-template-columns: 1fr; }
	.ted-about__media { max-width: 560px; }
	.ted-day__media { position: static; }
	.ted-day__card { min-height: 240px; }
	.ted-footer__grid { grid-template-columns: 1fr 1fr; }
	.ted-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
	.ted-pillars { grid-template-columns: 1fr; }
	.ted-gallery { grid-template-columns: repeat(2, 1fr); }
	.ted-gallery--grid .ted-gallery__item:nth-child(6n + 4) { grid-column: auto; }
	.ted-stat { border-left: 0; border-top: 1px solid var(--ted-line); padding: 1.4rem 0; }
	.ted-stat::before { left: 0; top: -1px; height: 2px !important; width: 0; transition: width 1.2s var(--ted-anim-ease) .3s; }
	.ted-stat.is-in::before, .ted-anim-off .ted-stat::before { width: 60px; }
	.ted-badge { left: auto; right: -.8rem; bottom: -2rem; }
	.ted-about__media::before { inset: 1rem -.8rem -1rem 1rem; }
	.ted-map__card { left: var(--ted-pad); right: var(--ted-pad); bottom: 1rem; max-width: none; }
	.ted-event { grid-template-columns: 1fr; gap: .1rem; padding: .7rem .8rem; }
	.ted-lightbox { grid-template-columns: 1fr; padding: 4rem .5rem 2rem; }
	.ted-lightbox__nav { position: absolute; bottom: 1.5rem; }
	.ted-lightbox__prev { left: 30%; }
	.ted-lightbox__next { right: 30%; }
}

@media (max-width: 600px) {
	.ted-header__cta { display: none; }
	.ted-brand__sub { display: none; }
	.ted-form { grid-template-columns: 1fr; }
	.ted-cd__sep { display: none; }
	.ted-cd__units { gap: .45rem; }
	.ted-cd--flip .ted-cd__value, .ted-cd--segment .ted-cd__value { font-size: 1.9rem; }
	.ted-cd__label { font-size: .6rem; letter-spacing: .14em; }
	.ted-hero__subtitle { letter-spacing: .18em; }
	.ted-hero__actions .ted-btn { width: 100%; }
	.ted-footer__grid { grid-template-columns: 1fr; }
	.ted-form__foot { flex-direction: column; align-items: stretch; }
	.ted-form__foot .ted-btn { width: 100%; }
}

/* ============ Movimento ridotto ============ */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
		transition-delay: 0s !important;
	}
	.ted-reveal, .ted-intro, .ted-char { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; }
	.ted-cursor, .ted-embers, .ted-siren, .ted-ecg__blip, .ted-ecg__head, .ted-ecg__gap { display: none !important; }
	.ted-hero__ecg { clip-path: none !important; }
	.ted-ticker__track { animation: none !important; }
}

@media print {
	.ted-header, .ted-preloader, .ted-progress, .ted-cursor, .ted-top, .ted-embers, .ted-siren, .ted-map { display: none !important; }
	body { background: #fff; color: #000; }
	.ted-reveal, .ted-intro, .ted-char { opacity: 1 !important; transform: none !important; }
}
