/* ==========================================================================
   Tendenza – main stylesheet (mobile-first)
   Breakpoints: 600 (large phone) · 768 (tablet) · 1100 (desktop) · 1400 (wide)
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL OFL – no third-party requests) ---------- */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/bricolage-var.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-var.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("../fonts/jetbrains-mono-var.woff2") format("woff2"); }

/* ---------- Tokens: direzione C "Termometro" ---------- */
:root {
	--td-accent: #ff5a1f;          /* arancio: CTA, live, trend in crescita */
	--td-on-accent: #ffffff;
	--td-live: #ff5a1f;
	--td-heat-1: #ffb21a;
	--td-heat-2: #ff5a1f;
	--td-heat-3: #e0115f;
	--td-heat: linear-gradient(135deg, var(--td-heat-1) 0%, var(--td-heat-2) 45%, var(--td-heat-3) 100%);
	--td-bg-light: #fbf7f1;
	--td-bg-dark: #14100e;

	--td-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--td-font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
	--td-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

	--td-radius: 22px;
	--td-radius-sm: 14px;
	--td-gap: 16px;
	--td-appbar-h: 56px;
	--td-bottombar-h: 64px;
	--td-safe-b: env(safe-area-inset-bottom, 0px);
	--td-ease: cubic-bezier(.2, .8, .2, 1);
}

:root,
[data-theme="light"] {
	--td-bg: var(--td-bg-light);
	--td-surface: #ffffff;
	--td-surface-2: #f3ece2;
	--td-text: #1d1410;
	--td-muted: #7c6f66;
	--td-sub: #4f433c;
	--td-line: #ede4d8;
	--td-primary: #1d1410;
	--td-on-primary: #ffffff;
	--td-primary-ink: #e8430e;
	--td-accent-ink: #e8430e;
	--td-live-ink: #e8430e;
	--td-up: #e8430e;
	--td-pe-bg: #fff0c2; --td-pe: #8a5a00;
	--td-pc-bg: #ffe0d1; --td-pc: #b33a0a;
	--td-pp-bg: #ffd3e0; --td-pp: #a3104a;
	--td-bar: #1d1410;
	--td-bar-text: #fbf1e8;
	--td-photo: #f3ece2;
	--td-shadow: 0 1px 2px rgba(80, 40, 10, .04), 0 8px 24px rgba(80, 40, 10, .06);
	color-scheme: light;
}

[data-theme="dark"] {
	--td-bg: var(--td-bg-dark);
	--td-surface: #1e1815;
	--td-surface-2: #2a221e;
	--td-text: #fbf1e8;
	--td-muted: #a8968a;
	--td-sub: #d6c7bc;
	--td-line: #2e2520;
	--td-primary: #fbf1e8;
	--td-on-primary: #14100e;
	--td-primary-ink: #ff8a3d;
	--td-accent-ink: #ff8a3d;
	--td-live-ink: #ff8a3d;
	--td-up: #ff8a3d;
	--td-pe-bg: rgba(255, 178, 26, .18); --td-pe: #ffc24d;
	--td-pc-bg: rgba(255, 90, 31, .18);  --td-pc: #ff8a3d;
	--td-pp-bg: rgba(224, 17, 95, .2);   --td-pp: #ff6b9a;
	--td-bar: #241c18;
	--td-bar-text: #fbf1e8;
	--td-photo: #2a221e;
	--td-shadow: none;
	color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--td-bg);
	color: var(--td-text);
	font: 400 16px/1.55 var(--td-font);
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	overflow-x: hidden;
}
body.td-has-bottombar { padding-bottom: calc(var(--td-bottombar-h) + var(--td-safe-b)); }
body.td-lock { overflow: hidden; }
img, svg, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
@media (hover: hover) { a:hover { color: var(--td-primary-ink); } }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--td-font-display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; text-wrap: balance; }
p, li { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--td-primary); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.td-skip:focus { clip: auto; width: auto; height: auto; z-index: 1000; top: 8px; left: 8px; background: var(--td-primary); color: var(--td-on-primary); padding: 8px 14px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.td-container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 16px; }
.td-icon { flex: none; }

/* ---------- Buttons ---------- */
.td-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; font-size: 15px; transition: transform .15s var(--td-ease), background .2s; }
.td-btn:active { transform: scale(.97); }
.td-btn--primary { background: var(--td-primary); color: var(--td-on-primary); }
.td-btn--primary:hover { color: var(--td-on-primary); filter: brightness(1.08); }
.td-btn--ghost { background: var(--td-surface); border-color: var(--td-line); }
.td-iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: transparent; border: 0; }
.td-iconbtn:hover { background: var(--td-surface-2); }
[data-td-mode] .td-icon--sun { display: none; }
[data-theme="dark"] [data-td-mode] .td-icon--sun { display: block; }
[data-theme="dark"] [data-td-mode] .td-icon--moon { display: none; }

/* ---------- App bar ---------- */
.td-appbar {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--td-bg) 82%, transparent);
	backdrop-filter: saturate(1.6) blur(14px);
	-webkit-backdrop-filter: saturate(1.6) blur(14px);
	border-bottom: 1px solid var(--td-line);
	padding-top: env(safe-area-inset-top, 0px);
	transition: transform .25s var(--td-ease);
}
.td-appbar.is-hidden { transform: translateY(-100%); }
.admin-bar .td-appbar { top: 46px; }
@media (max-width: 600px) { .admin-bar .td-appbar { top: 0; } }
@media (min-width: 783px) { .admin-bar .td-appbar { top: 32px; } }
.td-appbar__inner { display: flex; align-items: center; gap: 4px; height: var(--td-appbar-h); padding-inline: 6px; }
.td-appbar { view-transition-name: td-appbar; }
.td-brand { flex: 1; min-width: 0; overflow: hidden; }
.td-brand img { max-height: 34px; width: auto; }
.td-brand__text { display: flex; align-items: center; gap: 8px; min-width: 0; font: 800 19px/1 var(--td-font-display); text-transform: uppercase; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-brand__mark { flex: none; }
@media (max-width: 420px) { .td-appbar .td-livepill { display: none; } } /* Live is in the bottom bar */
.td-brand__mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--td-primary); color: var(--td-on-primary); font-size: 16px; transform: skewX(-8deg); }
.td-appbar__actions { display: flex; align-items: center; gap: 2px; }
.td-nav { display: none; }
.td-livepill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; margin-right: 4px; border-radius: 999px; background: color-mix(in srgb, var(--td-live) 14%, transparent); color: var(--td-live-ink); font: 800 12px/1 var(--td-font); letter-spacing: .06em; }
.td-livepill:hover { color: var(--td-live-ink); }
.td-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--td-live); box-shadow: 0 0 0 0 var(--td-live); animation: td-pulse 1.6s infinite; }
@keyframes td-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--td-live) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.td-progress { position: absolute; left: 0; bottom: -1px; height: 3px; width: 100%; background: var(--td-primary); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* ---------- Ticker + chips ---------- */
.td-ticker { border-bottom: 1px solid var(--td-line); background: var(--td-surface); }
.td-chips { padding-top: 12px; padding-inline: 0; }
.td-chips .td-chips__list { padding-inline: 16px; scroll-padding-inline: 16px; mask-image: linear-gradient(90deg, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); }
.td-chips__list, .td-scroller {
	display: flex; gap: 8px; list-style: none; margin: 0; padding: 0 0 4px;
	overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.td-chips__list::-webkit-scrollbar, .td-scroller::-webkit-scrollbar { display: none; }
.td-chips__list a { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--td-surface); border: 1px solid var(--td-line); font-weight: 600; font-size: 14px; white-space: nowrap; scroll-snap-align: start; }
.td-chips__list .current-menu-item a, .td-chips__list .current-cat a { background: var(--td-text); color: var(--td-bg); border-color: transparent; }
@media (hover: hover) { .td-chips__list a:hover { border-color: var(--td-primary); } }
.td-chips__list a:active { transform: scale(.96); }

/* ---------- Drawer ---------- */
.td-drawer { position: fixed; inset: 0; z-index: 90; visibility: hidden; }
.td-drawer.is-open { visibility: visible; }
.td-drawer__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .25s; }
.td-drawer.is-open .td-drawer__backdrop { opacity: 1; }
.td-drawer__panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(86vw, 340px); background: var(--td-surface); padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 24px; overflow-y: auto; transform: translateX(-100%); transition: transform .3s var(--td-ease); }
.td-drawer.is-open .td-drawer__panel { transform: none; }
.td-drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 18px; }
.td-drawer__menu, .td-drawer__menu ul, .td-drawer__sports { list-style: none; margin: 0; padding: 0; }
.td-drawer__menu a, .td-drawer__sports a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 12px; border-radius: 12px; font-weight: 700; font-size: 17px; }
.td-drawer__menu a::after, .td-drawer__sports a::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--td-muted); border-top: 2px solid var(--td-muted); transform: rotate(45deg); opacity: .6; }
.td-drawer__menu .current-menu-item > a, .td-drawer__sports .current-menu-item > a { background: color-mix(in srgb, var(--td-primary) 14%, transparent); color: var(--td-primary-ink); }
.td-drawer__menu a:active, .td-drawer__sports a:active { background: var(--td-surface-2); }
.td-drawer__head strong { font: 800 20px/1 var(--td-font-display); text-transform: uppercase; }
.td-drawer__menu .sub-menu { padding-left: 14px; }
.td-drawer__label { margin: 18px 8px 4px; color: var(--td-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.td-drawer__install { width: 100%; margin-top: 20px; }

/* ---------- Search sheet ---------- */
.td-search { position: fixed; inset: 0; z-index: 95; background: color-mix(in srgb, var(--td-bg) 96%, transparent); backdrop-filter: blur(10px); display: none; }
.td-search.is-open { display: block; animation: td-fade .2s; }
.td-search__sheet { max-width: 720px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px 24px; height: 100%; display: flex; flex-direction: column; }
.td-search__form { display: flex; align-items: center; gap: 10px; background: var(--td-surface); border: 1px solid var(--td-line); border-radius: 14px; padding: 4px 4px 4px 14px; }
.td-search__form input { flex: 1; border: 0; background: transparent; font-size: 17px; height: 48px; color: var(--td-text); outline: none; min-width: 0; }
.td-search__results { overflow-y: auto; padding-top: 12px; }
.td-search__results:empty { display: none; }
.td-search__suggest { overflow-y: auto; padding-top: 18px; }
.td-search__suggest .td-eyebrow { margin: 0 4px 10px; }
.td-search__suggest .td-chips__list { padding: 0 0 6px; mask-image: none; -webkit-mask-image: none; flex-wrap: wrap; }
.td-search__latest { list-style: none; margin: 18px 0 0; padding: 0; }
.td-search__latest a { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--td-line); font-weight: 600; }
.td-search__latest .td-icon { color: var(--td-muted); }
.td-search.has-results .td-search__suggest { display: none; }
.td-search__results a { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; }
.td-search__results a:hover { background: var(--td-surface); }
.td-search__results img { width: 64px; height: 44px; object-fit: cover; border-radius: 8px; }
@keyframes td-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Layout ---------- */
.td-main { min-height: 60vh; outline: none; }
.td-layout { display: grid; gap: 24px; padding-top: 16px; padding-bottom: 32px; }
.td-layout__main { min-width: 0; }
.td-layout__side { min-width: 0; }
.td-sticky { position: sticky; top: calc(var(--td-appbar-h) + 16px); display: grid; gap: 16px; }
.td-elementor-full { width: 100%; }

.td-section-title { display: flex; align-items: center; gap: 10px; font-size: 20px; text-transform: uppercase; margin: 28px 0 12px; }
.td-section-title::before { content: ""; width: 4px; height: 20px; border-radius: 2px; background: var(--td-primary); }
.td-eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--td-muted); }

/* ---------- Badge + meta ---------- */
.td-badge { --td-badge: var(--td-primary); display: inline-block; padding: 3px 9px; border-radius: 6px; background: color-mix(in srgb, var(--td-badge) 16%, transparent); color: var(--td-badge); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
[data-theme="light"] .td-badge { color: color-mix(in srgb, var(--td-badge) 55%, #000); background: color-mix(in srgb, var(--td-badge) 14%, #fff); }
.td-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--td-muted); font-size: 13px; }
.td-meta > * + *::before { content: "·"; margin-right: 10px; }
.td-meta__read { display: inline-flex; align-items: center; gap: 4px; }
.td-meta__read::before { margin-right: 6px !important; }

/* ---------- Cards ---------- */
.td-grid { display: grid; gap: var(--td-gap); grid-template-columns: 1fr; }
.td-feed { display: grid; gap: 2px; background: var(--td-line); border-radius: var(--td-radius); overflow: hidden; }
.td-card { position: relative; display: flex; flex-direction: column; background: var(--td-surface); border-radius: var(--td-radius); overflow: hidden; box-shadow: var(--td-shadow); transition: transform .2s var(--td-ease); }
.td-card:active { transform: scale(.985); }
.td-card__media { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--td-surface-2); overflow: hidden; }
.td-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--td-ease); }
@media (hover: hover) { .td-card:hover .td-card__media img { transform: scale(1.04); } }
.td-card__placeholder { display: grid; place-items: center; height: 100%; color: var(--td-muted); }
.td-card__play { position: absolute; left: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; background: rgba(0, 0, 0, .6); }
.td-card__play::after { content: ""; position: absolute; left: 15px; top: 12px; border-left: 14px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.td-card__body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.td-card__body .td-badge { align-self: flex-start; }
.td-card__title { font-size: 21px; line-height: 1.15; margin: 0; }
.td-card__title a::after { content: ""; position: absolute; inset: 0; } /* whole card tappable */
.td-card__excerpt { margin: 0; color: var(--td-muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.td-card .td-badge, .td-card .td-meta { position: relative; z-index: 1; }
.td-card .td-meta { margin-top: auto; }

.td-card--row { flex-direction: row; border-radius: 0; box-shadow: none; }
.td-card--row .td-card__media { flex: 0 0 112px; aspect-ratio: 1; margin: 12px 0 12px 12px; border-radius: 12px; }
.td-card--row .td-card__body { padding: 12px 14px; gap: 6px; }
.td-card--row .td-card__title { font-size: 18px; }

.td-card--hero .td-card__media { aspect-ratio: 1; max-height: 68vh; width: 100%; }
.td-card--hero .td-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, .55) 60%, rgba(0, 0, 0, .9)); }
.td-card--hero .td-card__body { position: absolute; left: 0; right: 0; bottom: 0; color: #fff; padding: 18px; gap: 10px; }
.td-card--hero .td-card__title { font-size: clamp(26px, 7.4vw, 48px); line-height: 1.04; text-transform: uppercase; }
.td-card--hero .td-badge { background: color-mix(in srgb, var(--td-badge) 70%, #000); color: #fff; filter: none; }
.td-card--hero .td-card__excerpt, .td-card--hero .td-meta { color: rgba(255, 255, 255, .8); }
.td-hero { margin-top: 4px; }

.td-scroller > .td-card { flex: 0 0 78%; scroll-snap-align: start; }

/* Skeleton */
.td-skel { background: linear-gradient(90deg, var(--td-surface-2) 25%, var(--td-surface) 37%, var(--td-surface-2) 63%); background-size: 400% 100%; animation: td-shimmer 1.4s ease infinite; border-radius: 8px; }
@keyframes td-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.td-pager { display: flex; justify-content: center; padding: 24px 0; }
.td-pager.is-loading .td-btn { opacity: .6; pointer-events: none; }

/* ---------- Archive head / hub ---------- */
.td-archive-head { --td-badge: var(--td-primary); position: relative; padding: 18px; margin-bottom: 16px; border-radius: var(--td-radius); background: linear-gradient(135deg, color-mix(in srgb, var(--td-badge) 28%, var(--td-surface)), var(--td-surface)); overflow: hidden; }
.td-archive-head__title { font-size: clamp(28px, 8vw, 56px); line-height: 1.02; text-transform: uppercase; margin: 0; }
.td-archive-head__desc { color: var(--td-muted); margin-top: 6px; }
.td-hub { margin-top: 16px; }

/* ---------- Article ---------- */
.td-article__head { padding-top: 4px; display: grid; justify-items: start; gap: 10px; }
.td-crumbs { font-size: 13px; color: var(--td-muted); }
.td-crumbs span { margin: 0 4px; }
.td-article__title { font-size: clamp(28px, 7.6vw, 56px); line-height: 1.04; margin: 0; text-transform: uppercase; }
.td-article__lead { font-size: clamp(17px, 4.4vw, 20px); line-height: 1.45; color: var(--td-muted); margin: 0; }
.td-article__byline { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 0; margin-top: 4px; border-top: 1px solid var(--td-line); border-bottom: 1px solid var(--td-line); }
.td-avatar { border-radius: 50%; }
.td-article__media { margin: 16px -16px 20px; }
.td-article__media img { width: 100%; }
.td-article__media figcaption { font-size: 13px; color: var(--td-muted); padding: 8px 16px 0; }

.td-prose { font-size: 17px; line-height: 1.7; max-width: 720px; overflow-wrap: break-word; }
.td-prose > * { margin: 0 0 1.1em; }
.td-prose h2 { font-size: clamp(24px, 6vw, 32px); margin: 1.6em 0 .5em; }
.td-prose h3 { font-size: clamp(20px, 5vw, 25px); margin: 1.4em 0 .4em; }
.td-prose a { color: var(--td-primary-ink); text-decoration: underline; text-underline-offset: 3px; }
.td-prose .td-keypoints { list-style: none; padding: 14px 16px 14px 18px; border-left: 4px solid var(--td-accent, #ff5a1f); background: var(--td-surface-2, rgba(255,90,31,.06)); border-radius: 0 12px 12px 0; }
.td-prose .td-keypoints li { position: relative; padding-left: 16px; margin: 0 0 .45em; font-size: 16px; line-height: 1.55; }
.td-prose .td-keypoints li:last-child { margin-bottom: 0; }
.td-prose .td-keypoints li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--td-accent, #ff5a1f); }
.td-prose blockquote { margin-left: 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--td-primary); font-family: var(--td-font-display); font-size: clamp(22px, 5.6vw, 28px); line-height: 1.25; }
.td-prose img, .td-prose figure { border-radius: 12px; }
.td-prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.td-prose th, .td-prose td { padding: 10px; border-bottom: 1px solid var(--td-line); text-align: left; }
.td-prose .alignwide, .td-prose .alignfull { max-width: none; }

.td-article__foot { display: grid; gap: 16px; margin: 28px 0; }
.td-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.td-tags a { padding: 6px 12px; border-radius: 999px; background: var(--td-surface); border: 1px solid var(--td-line); font-size: 13px; font-weight: 600; }

/* ---------- Comments ---------- */
.td-comments__list { list-style: none; padding: 0; }
.td-comments__list .comment-body { background: var(--td-surface); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.td-comments__list .children { list-style: none; padding-left: 18px; }
.comment-form input:not([type=submit]):not([type=checkbox]), .comment-form textarea, .td-searchform input {
	width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--td-line); background: var(--td-surface); color: var(--td-text); font: inherit; font-size: 16px;
}
.td-searchform { display: flex; gap: 8px; margin: 12px 0; }

/* ---------- Widgets ---------- */
.td-widget { background: var(--td-surface); border-radius: var(--td-radius); padding: 16px; box-shadow: var(--td-shadow); min-width: 0; }
.td-widget__title { font-size: 18px; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.td-widget__title::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--td-primary); }
.td-widget ul { list-style: none; padding: 0; margin: 0; }
.td-widget li { padding: 8px 0; border-bottom: 1px solid var(--td-line); }
.td-home-top, .td-after { display: grid; gap: 16px; }

/* ---------- Empty / 404 ---------- */
.td-empty { text-align: center; padding: 48px 16px; display: grid; gap: 12px; justify-items: center; }
.td-404__code { font: 800 120px/1 var(--td-font-display); margin: 0; }
.td-404__code span { color: var(--td-primary-ink); }

/* ---------- Footer ---------- */
.td-footer { background: var(--td-surface); border-top: 1px solid var(--td-line); padding: 32px 0 28px; margin-top: 32px; font-size: 14px; }
.td-footer__cols { display: grid; gap: 24px; margin-bottom: 24px; }
.td-footer__cols .td-widget { box-shadow: none; padding: 0; background: none; }
.td-footer__menu { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 0 0 12px; font-weight: 600; }
.td-footer__copy { color: var(--td-muted); margin: 0; font-size: 12px; line-height: 1.5; }
.td-footer__menu a { display: inline-block; padding: 6px 0; }

/* ---------- Bottom bar (mobile app nav) ---------- */
.td-bottombar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
	display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
	height: calc(var(--td-bottombar-h) + var(--td-safe-b)); padding-bottom: var(--td-safe-b);
	background: color-mix(in srgb, var(--td-surface) 88%, transparent);
	backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
	border-top: 1px solid var(--td-line);
	view-transition-name: td-bottombar;
}
.td-bottombar__item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 600; letter-spacing: .01em; color: var(--td-muted); }
.td-bottombar__item .td-icon { box-sizing: content-box; padding: 4px 18px; border-radius: 999px; transition: transform .15s, background .2s; }
.td-bottombar__item.is-active { color: var(--td-text); font-weight: 700; }
.td-bottombar__item.is-active .td-icon { color: var(--td-primary-ink); background: color-mix(in srgb, var(--td-primary) 18%, transparent); }
@media (hover: hover) { .td-bottombar__item:hover { color: var(--td-text); } }
.td-bottombar__item:active .td-icon { transform: scale(.9); background: var(--td-surface-2); }

.td-totop { position: fixed; right: 14px; bottom: calc(var(--td-bottombar-h) + var(--td-safe-b) + 14px); z-index: 55; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--td-text); color: var(--td-bg); display: grid; place-items: center; box-shadow: var(--td-shadow); }
.td-toast { position: fixed; left: 50%; bottom: calc(var(--td-bottombar-h) + var(--td-safe-b) + 16px); z-index: 100; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--td-text); color: var(--td-bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; transition: .25s var(--td-ease); }
.td-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   Phones (< 600px): app-style compact feed, tighter article head
   ========================================================================== */
@media (max-width: 599px) {
	.td-layout { gap: 20px; padding-top: 14px; }

	/* Feed: one grouped card with compact rows (thumb + title), like news apps */
	.td-grid { gap: 0; background: var(--td-surface); border-radius: var(--td-radius); box-shadow: var(--td-shadow); overflow: hidden; }
	.td-grid > .td-card { flex-direction: row; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 0; box-shadow: none; background: transparent; }
	.td-grid > .td-card + .td-card { border-top: 1px solid var(--td-line); }
	.td-grid .td-card__media { flex: 0 0 104px; aspect-ratio: 4 / 3; border-radius: 10px; order: 2; }
	.td-grid .td-card__body { padding: 0; gap: 6px; min-height: 78px; }
	.td-grid .td-card__title { font-size: 17px; line-height: 1.22; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
	.td-grid .td-card__excerpt, .td-grid .td-meta__author, .td-grid .td-meta__read { display: none; }
	.td-grid .td-meta { font-size: 12px; }
	.td-grid .td-meta__time::before { content: none; }
	.td-grid .td-badge { font-size: 10px; padding: 2px 7px; }
	.td-grid .td-card__play { width: 28px; height: 28px; left: 6px; bottom: 6px; }
	.td-grid .td-card__play::after { left: 11px; top: 8px; border-left-width: 10px; border-top-width: 6px; border-bottom-width: 6px; }
	.td-grid > .td-card:active { transform: none; background: var(--td-surface-2); }

	.td-card--hero .td-card__excerpt { display: none; }
	.td-hero .td-card { box-shadow: none; }

	/* Article: content first */
	.single .td-chips, .page .td-chips { display: none; }
	.td-crumbs { display: none; }
	.td-article__byline .td-avatar { width: 36px; height: 36px; }

	.td-archive-head { margin-inline: -16px; border-radius: 0; padding: 20px 16px; }
	.td-footer { text-align: left; }
	.td-footer__menu { justify-content: flex-start; }
}

/* ---------- Page transitions (Chrome/Edge/Safari 18+; ignored elsewhere) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* ==========================================================================
   ≥ 600px – large phones / small tablets
   ========================================================================== */
@media (min-width: 600px) {
	.td-container { padding-inline: 20px; }
	.td-grid { grid-template-columns: repeat(2, 1fr); }
	.td-card--hero .td-card__media { aspect-ratio: 16 / 9; }
	.td-scroller > .td-card { flex-basis: 46%; }
	.td-article__media { margin-inline: 0; }
	.td-article__media img { border-radius: var(--td-radius); }
	.td-footer__cols { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   ≥ 768px – tablets: bottom bar becomes optional rail; bigger type
   ========================================================================== */
@media (min-width: 768px) {
	:root { --td-appbar-h: 64px; --td-gap: 20px; }
	.td-card--row .td-card__media { flex-basis: 180px; aspect-ratio: 16 / 10; }
	.td-card--hero .td-card__body { padding: 32px; max-width: 80%; }
	.td-archive-head { padding: 32px; }
}

/* ==========================================================================
   ≥ 1100px – desktop: inline nav, sidebar, no bottom bar
   ========================================================================== */
@media (min-width: 1100px) {
	body.td-has-bottombar { padding-bottom: 0; }
	.td-bottombar { display: none; }
	.td-totop { bottom: 24px; right: 24px; }
	.td-toast { bottom: 24px; }
	.td-appbar__menu { display: none; }
	.td-brand { flex: 0 0 auto; margin-right: 24px; }
	.td-nav { display: block; flex: 1; }
	.td-nav__list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
	.td-nav__list > li { position: relative; }
	.td-nav__list > li > a { display: flex; align-items: center; height: var(--td-appbar-h); padding: 0 12px; font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .02em; }
	.td-nav__list > .current-menu-item > a, .td-nav__list > .current-menu-ancestor > a { box-shadow: inset 0 -3px var(--td-primary); }
	.td-nav__list .sub-menu { position: absolute; top: 100%; left: 0; min-width: 220px; list-style: none; margin: 0; padding: 8px; background: var(--td-surface); border-radius: 14px; box-shadow: var(--td-shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s var(--td-ease); }
	.td-nav__list li:hover > .sub-menu, .td-nav__list li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
	.td-nav__list .sub-menu a { display: block; padding: 10px 12px; border-radius: 8px; }
	.td-nav__list .sub-menu a:hover { background: var(--td-surface-2); }

	.td-has-sidebar .td-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; }
	.td-layout--page { grid-template-columns: minmax(0, 1fr) !important; max-width: 860px; }
	.td-grid { grid-template-columns: repeat(3, 1fr); }
	.td-has-sidebar .td-grid { grid-template-columns: repeat(2, 1fr); }
	.td-card--hero .td-card__media { aspect-ratio: 21 / 9; }
	.td-scroller { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; }
	.td-has-sidebar .td-scroller { grid-template-columns: repeat(2, 1fr); }
	.td-chips { display: none; } /* desktop uses the inline nav */
}

@media (min-width: 1400px) {
	.td-has-sidebar .td-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Print */
@media print { .td-appbar, .td-ticker, .td-chips, .td-bottombar, .td-share, .td-related, .td-comments, .td-layout__side, .td-footer { display: none !important; } }

/* Plugin widgets inside prose (pages/posts): no prose link styling */
.td-prose .tdc a { color: inherit; text-decoration: none; }
.td-prose .tdc table { display: table; font-size: 14px; }
.td-prose .tdc ul, .td-prose .tdc ol { padding: 0; }
.td-prose > .tdc { max-width: none; }
.td-layout--page .td-prose { max-width: none; }

/* Predictions archive */
.td-preds-hub { display: grid; gap: 20px; }

/* Logged-in users: keep overlays below the WordPress admin bar */
.admin-bar .td-search__sheet, .admin-bar .td-drawer__panel { padding-top: calc(env(safe-area-inset-top, 0px) + 46px + 12px); }
@media (min-width: 783px) { .admin-bar .td-search__sheet, .admin-bar .td-drawer__panel { padding-top: calc(32px + 12px); } }

/* Custom logo + site name in the app bar */
.td-brand__logo { width: 36px; height: 36px; flex: none; border-radius: 9px; object-fit: contain; }
.td-brand__text--logo span { overflow: hidden; text-overflow: ellipsis; }

/* Empty home (new site) */
.td-empty--soon { background: var(--td-surface); border-radius: var(--td-radius); box-shadow: var(--td-shadow); padding: 32px 20px; }
.td-empty--soon h3 { margin: 0; font-size: 24px; text-transform: uppercase; }
.td-empty--soon p { margin: 0; color: var(--td-muted); }
.td-empty__ico { font-size: 36px; line-height: 1; }
.td-home-top { margin-bottom: 8px; }


/* ==========================================================================
   v1.1 – UI polish: typography, social, share, empty states
   ========================================================================== */

/* Typography: Barlow Condensed is now real on every device */
h1, h2, h3, h4 { letter-spacing: 0; font-weight: 700; }
.td-article__title, .td-archive-head__title, .td-card--hero .td-card__title, .td-404__code { font-weight: 800; letter-spacing: -.005em; }
.td-section-title, .td-widget__title { font-weight: 700; letter-spacing: .01em; }
.td-brand__text { font-weight: 800; font-size: 21px; letter-spacing: .02em; }
.td-card__title { font-weight: 700; }

/* Page header (Live, Classifiche…) */
.td-layout--page .td-article__head { margin-bottom: 18px; }
.td-layout--page .td-article__title { font-size: clamp(30px, 8vw, 52px); }

/* Home top area: no card-in-card */
.td-home-top { gap: 8px; margin-bottom: 4px; }
.td-home-top .td-widget { background: none; box-shadow: none; padding: 0; border-radius: 0; }
.td-home-top .td-section-title:first-child, .td-home-top .wp-block-heading:first-child { margin-top: 4px; }

/* Widgets that render nothing (e.g. news feed temporarily unavailable) disappear */
.td-widget:has(> .tdc:empty), .td-widget:has(> .wp-block-heading + .tdc:empty) { display: none; }
.td-widget > .wp-block-heading { margin: 0 0 12px; font-size: 18px; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.td-widget > .wp-block-heading::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--td-primary); }
.td-widget > p:last-child { margin-bottom: 0; }

/* Share bar */
.td-share { display: grid; gap: 10px; padding: 16px; border-radius: var(--td-radius); background: var(--td-surface); box-shadow: var(--td-shadow); }
.td-share__label { margin: 0; font: 700 14px/1 var(--td-font-display); text-transform: uppercase; letter-spacing: .06em; color: var(--td-muted); }
.td-share__row { display: flex; gap: 8px; flex-wrap: wrap; }
.td-share__row > * { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 14px; border: 0; background: var(--td-surface-2); color: var(--td-text); transition: transform .15s var(--td-ease), background .2s, color .2s; }
.td-share__row > *:active { transform: scale(.92); }
.td-share__native { background: var(--td-primary) !important; color: var(--td-on-primary) !important; }
.td-share__link--whatsapp { color: #25d366; }
.td-share__link--telegram { color: #26a5e4; }
.td-share__link--facebook { color: #1877f2; }
@media (hover: hover) {
	.td-share__link--whatsapp:hover { background: #25d366; color: #fff; }
	.td-share__link--telegram:hover { background: #26a5e4; color: #fff; }
	.td-share__link--x:hover { background: var(--td-text); color: var(--td-bg); }
	.td-share__link--facebook:hover { background: #1877f2; color: #fff; }
	.td-share__copy:hover { background: var(--td-text); color: var(--td-bg); }
}
@media (max-width: 599px) { .td-share__row > * { flex: 1 1 0; width: auto; min-width: 44px; } }

/* Social profiles (footer + drawer) */
.td-social { display: flex; flex-wrap: wrap; gap: 10px; }
.td-social__link { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--td-surface-2); color: var(--td-text); transition: transform .15s var(--td-ease), background .2s, color .2s; }
.td-social__link:active { transform: scale(.92); }
@media (hover: hover) {
	.td-social__link:hover { color: #fff; }
	.td-social__link--instagram:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
	.td-social__link--tiktok:hover, .td-social__link--x:hover, .td-social__link--threads:hover { background: #000; }
	.td-social__link--facebook:hover { background: #1877f2; }
	.td-social__link--youtube:hover { background: #ff0000; }
	.td-social__link--telegram:hover { background: #26a5e4; }
	.td-social__link--whatsapp:hover { background: #25d366; }
	.td-social__link--email:hover { background: var(--td-primary); color: var(--td-on-primary); }
}
.td-drawer__social { margin: 22px 8px 0; }

/* Footer */
.td-footer__cols .td-widget > .wp-block-heading { font-size: 16px; }
.td-footer__cols .td-widget p { color: var(--td-muted); line-height: 1.9; }
.td-footer__cols .td-widget a { color: var(--td-text); }
@media (hover: hover) { .td-footer__cols .td-widget a:hover { color: var(--td-primary-ink); } }
.td-footer__bottom { display: grid; gap: 16px; padding-top: 22px; border-top: 1px solid var(--td-line); }
.td-footer__social { justify-content: center; }
@media (min-width: 768px) {
	.td-footer__bottom { grid-template-columns: 1fr auto; align-items: center; }
	.td-footer__social { order: 2; justify-content: flex-end; }
	.td-footer__copy { order: 1; }
}

/* Sidebar on phones/tablets: on the home page the same data is already at the top */
@media (max-width: 1099px) { .home .td-layout__side, .blog .td-layout__side { display: none; } }
.td-sticky { padding-bottom: 8px; }
@media (max-width: 599px) {
	.td-footer .td-widget > .wp-block-heading { justify-content: center; }
	.td-footer .td-widget > .wp-block-heading::before { display: none; }
	.td-footer__cols { gap: 28px; }
}
@media (max-width: 1099px) { .td-footer { padding-bottom: 76px; } }
@media (min-width: 1100px) { .td-footer__social { padding-right: 60px; } }


/* ==========================================================================
   v1.2 – SPACING SYSTEM (single source of truth)
   8pt grid, Apple-HIG-like rhythm. Every component below reads these tokens:
   change a value here and the whole site stays consistent.
     --s1 4 · --s2 8 · --s3 12 · --s4 16 · --s5 20 · --s6 24 · --s7 32 · --s8 40 · --s9 48 · --s10 64
     --gutter   side margin of the page         16 / 24 / 32
     --section  space between page sections     32 / 40 / 56
     --stack    space between stacked blocks    16 / 20 / 24
     --pad      inner padding of cards/widgets  16 / 20 / 24
   ========================================================================== */
:root {
	--s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px; --s9: 48px; --s10: 64px;
	--gutter: 16px; --section: 32px; --stack: 16px; --pad: 16px;
	--r-sm: 12px; --r-md: 16px; --r-lg: 20px;
	--td-radius: var(--r-md);
	--td-gap: var(--stack);
	--td-appbar-h: 56px;
}
@media (min-width: 768px) {
	:root { --gutter: 24px; --section: 40px; --stack: 20px; --pad: 20px; --td-appbar-h: 64px; }
}
@media (min-width: 1100px) {
	:root { --gutter: 32px; --section: 56px; --stack: 24px; --pad: 24px; --td-appbar-h: 72px; --td-radius: var(--r-lg); }
}

/* ---------- Page frame ---------- */
.td-container { padding-inline: var(--gutter); }
.td-appbar__inner { padding-inline: max(var(--s2), calc(var(--gutter) - 10px)); gap: var(--s1); }
@media (min-width: 1100px) { .td-appbar__inner { padding-inline: var(--gutter); gap: var(--s2); } }
.td-layout { gap: var(--section); padding-top: var(--s6); padding-bottom: var(--section); }
@media (min-width: 1100px) {
	.td-layout { padding-top: var(--s7); }
	.td-has-sidebar .td-layout { gap: var(--s8); }
}
.td-sticky { top: calc(var(--td-appbar-h) + var(--s6)); gap: var(--stack); }

/* ---------- Ticker band (reference screenshot: more air above/below) ---------- */
.tdc--ticker .tdc-ticker { padding: var(--s4) var(--gutter); gap: var(--s3); scroll-padding-inline: var(--gutter); }
.tdc-tk { padding: var(--s3) var(--s4); gap: var(--s2); border-radius: var(--r-md); min-width: 152px; }
.tdc-tk__head { margin-bottom: 2px; }
.tdc-ticker__empty { padding: var(--s4) var(--gutter); }
@media (min-width: 1100px) {
	.tdc--ticker .tdc-ticker { padding-block: var(--s5); gap: var(--s4); }
	.tdc-tk { min-width: 176px; }
}

/* ---------- Chips ---------- */
.td-chips { padding-top: var(--s5); padding-bottom: var(--s1); }
.td-chips .td-chips__list { padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); gap: var(--s2); }
.td-chips__list a { height: 38px; padding: 0 var(--s4); }

/* ---------- Section headings ---------- */
.td-section-title { margin: var(--section) 0 var(--s4); gap: var(--s3); }
.td-layout__main > .td-section-title:first-child,
.td-home-top > .td-widget:first-child > .wp-block-heading:first-child,
.td-hero + .td-section-title { margin-top: 0; }
.td-hero + .td-section-title { margin-top: var(--section); }
.td-home-top { gap: var(--stack); margin-bottom: 0; }
.td-home-top .td-section-title { margin: 0 0 var(--s4); }
.td-home-top + .td-section-title, .td-home-top ~ .td-section-title { margin-top: var(--section); }

/* ---------- Cards & grids ---------- */
.td-grid, .td-scroller { gap: var(--stack); }
.td-card__body { padding: var(--pad); gap: var(--s2); }
.td-card--hero .td-card__body { padding: var(--s6); gap: var(--s3); }
@media (min-width: 1100px) { .td-card--hero .td-card__body { padding: var(--s8); } }
@media (max-width: 599px) {
	.td-grid > .td-card { padding: var(--s4); gap: var(--s3); }
	.td-grid .td-card__body { padding: 0; gap: var(--s2); }
}
.td-pager { padding: var(--s7) 0 0; }

/* ---------- Archive / hub header ---------- */
.td-archive-head { padding: var(--s6) var(--pad); margin-bottom: var(--s6); border-radius: var(--td-radius); }
.td-archive-head .td-eyebrow { margin-bottom: var(--s2); }
.td-archive-head__desc { margin-top: var(--s3); max-width: 62ch; }
.td-hub { margin-top: var(--s6); }
@media (min-width: 768px) { .td-archive-head { padding: var(--s8) var(--s7); } }
@media (max-width: 599px) { .td-archive-head { margin-inline: calc(var(--gutter) * -1); padding: var(--s6) var(--gutter); border-radius: 0; } }

/* ---------- Page header (Live, Classifiche…) ---------- */
.td-layout--page .td-article__head { margin-bottom: var(--s6); }

/* ---------- Article ---------- */
.td-article__head { gap: var(--s3); }
.td-article__byline { padding: var(--s3) 0; margin-top: var(--s2); }
.td-article__media { margin: var(--s6) calc(var(--gutter) * -1) var(--s7); }
.td-article__media figcaption { padding: var(--s2) var(--gutter) 0; }
@media (min-width: 600px) { .td-article__media { margin-inline: 0; } .td-article__media figcaption { padding-inline: 0; } }
.td-prose > * { margin: 0 0 1.15em; }
.td-article__foot { gap: var(--stack); margin: var(--section) 0; }
.td-share { padding: var(--pad); gap: var(--s3); }
.td-related { margin-top: var(--section); }
.td-related .td-section-title { margin-top: 0; }
.td-comments { margin-top: var(--section); }

/* ---------- Widgets (sidebar, home, footer) ---------- */
.td-widget { padding: var(--pad); border-radius: var(--td-radius); }
.td-widget > .wp-block-heading { margin: 0 0 var(--s4); }
.td-home-top .td-widget, .td-footer__cols .td-widget { padding: 0; }

/* ---------- Footer ---------- */
.td-footer { padding: var(--section) 0 var(--s7); margin-top: var(--section); }
.td-footer__cols { gap: var(--s7); margin-bottom: var(--s7); }
.td-footer__bottom { padding-top: var(--s6); gap: var(--s4); }
@media (max-width: 1099px) { .td-footer { padding-bottom: calc(var(--s7) + 56px); } }

/* ---------- Drawer & search ---------- */
.td-drawer__panel { padding: calc(env(safe-area-inset-top, 0px) + var(--s3)) var(--s4) var(--s7); }
.td-drawer__label { margin: var(--s6) var(--s3) var(--s2); }
.td-drawer__social { margin: var(--s6) var(--s3) 0; }
.td-search__sheet { padding: calc(env(safe-area-inset-top, 0px) + var(--s3)) var(--gutter) var(--s6); }

/* ---------- Empty states ---------- */
.td-empty { padding: var(--s9) var(--gutter); gap: var(--s3); }
.td-empty--soon { padding: var(--s8) var(--pad); }
.td-chips.td-container { padding-inline: 0; }
@media (max-width: 1099px) { .td-appbar__inner { padding-inline: calc(var(--gutter) - 11px); } } /* 44px icon buttons: glyph edge lands exactly on the gutter */
@media (min-width: 1100px) {
	/* Pages (Live, Classifiche…) sit on the same grid as the rest: aligned to the logo, readable width */
	.td-layout.td-layout--page { max-width: 1280px; }
	.td-layout--page > .td-article { max-width: 880px; }
}

/* v1.2.2 author box + AI transparency */
.td-authorbox { display: grid; grid-template-columns: 56px 1fr; gap: var(--s4, 16px); align-items: start; padding: var(--pad, 16px); border-radius: var(--td-radius); background: var(--td-surface); border: 1px solid var(--td-line); }
.td-authorbox__avatar { width: 56px; height: 56px; border-radius: 50%; }
.td-authorbox__name { margin: 0; font-weight: 700; font-size: 16px; line-height: 1.3; }
.td-authorbox__name a { color: var(--td-text); text-decoration: none; }
.td-authorbox__name a:hover { color: var(--td-accent, var(--td-primary)); }
.td-authorbox__bio { margin: 4px 0 0; color: var(--td-muted); font-size: 14px; line-height: 1.5; }
.td-authorbox__ai { grid-column: 1 / -1; margin: 0; padding-top: var(--s3, 12px); border-top: 1px solid var(--td-line); color: var(--td-muted); font-size: 12.5px; line-height: 1.5; }
.td-authorbox__more { grid-column: 1 / -1; margin: 0; font-size: 13px; }
.td-authorbox__more a { color: var(--td-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.td-archive-head { --hp: var(--pad); }
@media (min-width: 768px) { .td-archive-head { --hp: var(--s7); } }
@media (max-width: 599px) { .td-archive-head { --hp: var(--gutter); } }
.td-archive-head .td-hub { margin-top: var(--s6); }
   (la regola della sidebar che li azzera non vale qui). */

/* v1.2.5 – tema chiaro: i colori del brand usati come TESTO prendono una tonalità più profonda (contrasto AA).
   Nel tema scuro "ink" coincide con il colore originale, quindi nulla cambia. */
/* Dichiarati anche su body: lì Elementor può ridefinire --td-primary, e gli "ink" devono seguirlo. */
:root, body { --td-on-primary: #ffffff; --td-primary-ink: var(--td-primary); --td-live-ink: var(--td-live); --td-accent-ink: var(--td-accent); }
[data-theme="light"], [data-theme="light"] body { --td-primary-ink: color-mix(in srgb, var(--td-primary) 84%, #000); --td-live-ink: color-mix(in srgb, var(--td-live) 78%, #000); --td-accent-ink: color-mix(in srgb, var(--td-accent) 55%, #000); }
[data-theme="dark"] .td-badge { color: color-mix(in srgb, var(--td-badge) 62%, #fff); background: color-mix(in srgb, var(--td-badge) 20%, transparent); }
[data-theme="dark"] .td-card--hero .td-badge { color: #fff; background: color-mix(in srgb, var(--td-badge) 70%, #000); }
[data-theme="dark"], [data-theme="dark"] body { --td-primary-ink: color-mix(in srgb, var(--td-primary) 72%, #fff); --td-live-ink: color-mix(in srgb, var(--td-live) 82%, #fff); }
   e, nel tema chiaro, card e intestazione ben distinte dallo sfondo. */

/* ===== v1.4 Lingue IT/EN/ES ===== */
.td-lang { position: relative; }
.td-lang__btn { width: auto; min-width: 44px; padding: 0 8px; gap: 4px; grid-auto-flow: column; display: inline-grid; }
.td-lang__code { font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.td-lang__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; display: grid; min-width: 168px; padding: 6px; border-radius: 14px; background: var(--td-surface); border: 1px solid var(--td-line); box-shadow: 0 12px 32px rgba(0, 0, 0, .22); }
.td-lang__menu[hidden] { display: none; }
.td-lang__menu button, .td-drawer__langs button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--td-text); font: inherit; font-weight: 700; font-size: 15px; text-align: left; cursor: pointer; }
.td-lang__menu button:hover { background: var(--td-surface-2, rgba(0,0,0,.05)); }
.td-lang__menu button.is-active, .td-drawer__langs button.is-active { background: color-mix(in srgb, var(--td-primary) 16%, transparent); color: var(--td-primary-ink); }
.td-lang__menu button.is-active::after { content: " \2713"; }
.td-drawer__langs { display: flex; gap: 8px; padding: 4px 0 8px; }
.td-drawer__langs button { flex: 1; text-align: center; padding: 0 8px; border: 1px solid var(--td-line); border-radius: 999px; font-size: 14px; }
@media (max-width: 420px) { .td-lang__code { display: none; } .td-lang__btn { padding: 0; } }
/* Traduzione automatica: niente barra/tooltip di Google, layout invariato. */
body { top: 0 !important; }
.skiptranslate iframe, iframe.skiptranslate, .goog-te-banner-frame, #goog-gt-tt, .goog-te-balloon-frame, .VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf { display: none !important; visibility: hidden !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
#td-gt { display: none !important; }


/* ==========================================================================
   Layout layer (ereditato da motori-club, neutro)
   ========================================================================== */
:root { --td-ok: #14a44d; --td-warn: #f2a40c; --td-bad: #e5484d; }
/* Brand */
.td-brand__text { gap: 10px; }
.td-brand__mark { width: auto; height: auto; background: none; transform: none; border-radius: 0; display: inline-flex; }
.td-logo-mark { display: block; border-radius: 10px; flex: none; }
.td-brand__word { font: 800 22px/1 var(--td-font-display); letter-spacing: .06em; font-style: italic; transform: skewX(-6deg); }
.td-brand__logo { max-height: 36px; width: auto; }

/* App bar extras */
.td-sellpill { display: none; align-items: center; gap: 4px; height: 36px; padding: 0 14px 0 10px; margin-right: 6px; border-radius: 999px; background: var(--td-primary); color: var(--td-on-primary) !important; font-weight: 700; font-size: 14px; }
.td-sellpill:hover { filter: brightness(1.08); }
@media (min-width: 768px) { .td-sellpill { display: inline-flex; } }
@media (max-width: 599px) { .td-hide-sm { display: none !important; } }
.td-account { display: inline-flex; }
.td-account img { width: 32px; height: 32px; border-radius: 50%; }
.td-nav__list > li > a { font-weight: 700; }
.td-nav__list .current-menu-item > a { color: var(--td-primary-ink); }

/* Buttons */
.td-btn--gold { background: var(--td-gold-grad); color: #1a1406; }
.td-linkbtn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; font: inherit; cursor: pointer; }
.td-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.td-muted { color: var(--td-muted); }
.td-steps { padding-left: 20px; margin: 0 0 12px; display: grid; gap: 8px; }

/* Section titles with "more" link */
.td-section-title { display: flex; align-items: center; gap: 10px; }
.td-section-more { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font: 700 14px/1 var(--td-font); text-transform: none; letter-spacing: 0; color: var(--td-primary-ink); white-space: nowrap; }
.td-section-title--cat::before { background: var(--td-badge, var(--td-primary)); }
.td-section { margin-top: var(--section); }

/* ---------- Home: top stories ---------- */
.td-home { padding-bottom: var(--section); }
.td-topstories { padding-top: var(--s4); padding-inline: 0; }
.td-topstories__track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); overscroll-behavior-x: contain; }
.td-topstories__track::-webkit-scrollbar { display: none; }
.td-story { flex: 0 0 86%; scroll-snap-align: start; }
.td-story__link { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; background: #111; color: #fff; isolation: isolate; }
.td-story__link:hover { color: #fff; }
.td-story__media, .td-story__media img, .td-story__media .td-card__placeholder { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.td-story__media img { transition: transform .6s var(--td-ease); }
@media (hover: hover) { .td-story__link:hover img { transform: scale(1.04); } }
.td-story__link::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.55) 62%, rgba(0,0,0,.88)); z-index: 1; }
.td-story__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 18px; display: grid; gap: 8px; }
.td-story__body .td-badge { justify-self: start; color: #fff; background: color-mix(in srgb, var(--td-badge, var(--td-primary)) 85%, #000); }
.td-story__title { font: 800 clamp(22px, 6vw, 30px)/1.05 var(--td-font-display); text-transform: uppercase; letter-spacing: -.005em; text-wrap: balance; }
.td-story__meta { font-size: 13px; color: rgba(255,255,255,.75); }
.td-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.td-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 99px; background: var(--td-line); transition: width .25s var(--td-ease), background .25s; }
.td-dots button.is-active { width: 22px; background: var(--td-primary); }
@media (min-width: 768px) {
	.td-story { flex-basis: 46%; }
	.td-story__link { aspect-ratio: 4 / 3; }
}
@media (min-width: 1100px) {
	.td-topstories { padding-inline: var(--gutter); padding-top: var(--s6); }
	.td-topstories__track { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 16px; overflow: visible; padding: 0; }
	.td-story { flex: none; }
	.td-story--lead { grid-row: span 2; }
	.td-story__link { aspect-ratio: auto; height: 100%; min-height: 230px; }
	.td-story--lead .td-story__link { min-height: 520px; }
	.td-story:not(.td-story--lead) .td-story__title { font-size: 20px; }
	.td-story--lead .td-story__title { font-size: 44px; }
	.td-story--lead .td-story__body { padding: 32px; }
	.td-dots { display: none; }
}

/* ---------- Home: quick tools ---------- */
.td-quick { margin-top: var(--s6); padding-inline: 0; }
.td-quick__grid { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px var(--gutter) 6px; scroll-snap-type: x proximity; }
.td-quick__grid::-webkit-scrollbar { display: none; }
.td-quick__item { flex: 0 0 auto; width: 104px; scroll-snap-align: start; display: grid; justify-items: center; gap: 6px; padding: 14px 8px 12px; border-radius: 18px; background: var(--td-surface); border: 1px solid var(--td-line); text-align: center; transition: transform .15s var(--td-ease), border-color .2s; }
.td-quick__item:active { transform: scale(.96); }
@media (hover: hover) { .td-quick__item:hover { border-color: color-mix(in srgb, var(--td-primary) 50%, transparent); color: inherit; } }
.td-quick__ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: color-mix(in srgb, var(--td-primary) 12%, var(--td-surface)); color: var(--td-primary-ink); }
.td-quick__label { font-weight: 700; font-size: 13px; line-height: 1.15; }
.td-quick__hint { display: none; font-size: 12px; color: var(--td-muted); }
@media (min-width: 768px) {
	.td-quick { padding-inline: var(--gutter); }
	.td-quick__grid { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; padding: 0; gap: 12px; }
	.td-quick__item { width: auto; grid-template-columns: auto 1fr; justify-items: start; align-items: center; text-align: left; column-gap: 12px; row-gap: 0; padding: 14px; }
	.td-quick__ico { grid-row: span 2; }
	.td-quick__label { font-size: 15px; }
	.td-quick__hint { display: block; }
}
@media (min-width: 1100px) { .td-quick__grid { grid-template-columns: repeat(8, 1fr); } .td-quick__item { grid-template-columns: 1fr; justify-items: center; text-align: center; row-gap: 6px; } .td-quick__ico { grid-row: auto; } .td-quick__hint { display: none; } }

/* ---------- Home: market band (dark premium) ---------- */
.td-band { margin-top: var(--section); padding: var(--s8) 0; background: var(--td-ink-grad); color: #f2f2f3; position: relative; overflow: hidden; }
.td-band::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.035) 75%), linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.035) 75%); background-size: 32px 32px; background-position: 0 0, 16px 16px; mask-image: linear-gradient(90deg, transparent, #000 60%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); pointer-events: none; }
.td-band > .td-container { position: relative; }
.td-band .td-eyebrow { color: #ff6b73; }
.td-band__title { font: 800 clamp(28px, 7vw, 44px)/1 var(--td-font-display); text-transform: uppercase; margin: 6px 0 18px; color: #fff; max-width: 18ch; }
.td-band__list { margin-top: var(--s7); }
.td-band .td-section-title { color: #fff; }
.td-band .td-section-more { color: #ff8a90; }
/* Plugin cards inside the dark band keep their own (light/dark) surfaces. */

/* ---------- Home: garage + fuel duo ---------- */
.td-duo { display: grid; gap: var(--stack); }
@media (min-width: 900px) { .td-duo { grid-template-columns: 1.3fr 1fr; align-items: stretch; } .td-duo--single { grid-template-columns: 1fr; } }
.td-duo__item > .tdc { margin-bottom: 0; height: 100%; }

/* ---------- Card scroller (category sections) ---------- */
.td-scroller--cards { gap: 14px; padding-bottom: 6px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
.td-scroller--cards > .td-card { flex: 0 0 76%; scroll-snap-align: start; }
@media (min-width: 600px) { .td-scroller--cards > .td-card { flex-basis: 44%; } }
@media (min-width: 1100px) { .td-scroller--cards { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; overflow: visible; } .td-scroller--cards > .td-card:nth-child(n+7) { display: none; } }

/* ---------- App CTA ---------- */
.td-appcta { display: grid; gap: 20px; align-items: center; padding: 26px 22px; border-radius: 26px; background: var(--td-ink-grad); color: #eee; overflow: hidden; }
.td-appcta h2 { font: 800 clamp(26px, 6vw, 38px)/1.02 var(--td-font-display); text-transform: uppercase; color: #fff; margin: 6px 0 10px; }
.td-appcta p { color: rgba(255,255,255,.75); margin: 0 0 16px; max-width: 52ch; }
.td-appcta .td-eyebrow { color: #ff6b73; }
.td-appcta .td-btn--ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; }
.td-appcta__art { justify-self: center; transform: rotate(-8deg); filter: drop-shadow(0 20px 40px rgba(225, 11, 23, .45)); }
.td-appcta__art .td-logo-mark { border-radius: 28px; }
@media (min-width: 768px) { .td-appcta { grid-template-columns: 1fr auto; padding: 40px; } .td-appcta__art { margin-right: 20px; } }

/* ---------- App pages (plugin shortcodes) ---------- */
.td-apppage { padding-top: var(--s4); padding-bottom: var(--section); }
.td-apppage__head { margin-bottom: var(--s4); }
.td-apppage__back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--td-muted); margin-bottom: 6px; }
.td-apppage__title { font: 800 clamp(28px, 6vw, 40px)/1.02 var(--td-font-display); text-transform: uppercase; margin: 0; }
@media (min-width: 1100px) { .td-apppage { padding-top: var(--s7); } }

/* ---------- Archive head extras ---------- */
.td-archive-head__subs { margin-top: var(--s4); flex-wrap: wrap; }
.td-archive-head__cta { margin-top: var(--s4); }
.td-grid__ad { grid-column: 1 / -1; }

/* ---------- Footer ---------- */
.td-footer__top { display: grid; gap: var(--s7); padding-bottom: var(--s6); margin-bottom: 0; }
.td-footer__brand .td-brand__text { display: inline-flex; margin-bottom: 10px; }
.td-footer__claim { color: var(--td-muted); margin: 0 0 14px; max-width: 40ch; }
.td-footer__h { font: 700 13px/1 var(--td-font); text-transform: uppercase; letter-spacing: .1em; color: var(--td-muted); margin: 0 0 12px; }
.td-footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.td-footer__col a { display: inline-block; padding: 5px 0; font-weight: 600; }
.td-footer__cols { display: grid; gap: var(--s6); grid-template-columns: 1fr 1fr; }
@media (min-width: 768px) { .td-footer__top { grid-template-columns: 1fr 2fr; } .td-footer__cols { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Bottom bar ---------- */
.td-bottombar__item.is-active .td-icon { color: var(--td-primary-ink); background: color-mix(in srgb, var(--td-primary) 14%, transparent); }
.td-standalone .td-appbar { padding-top: max(env(safe-area-inset-top, 0px), 4px); }
/* App bar on phones: brand never truncated; language lives in the drawer. */
.td-brand { flex: 1 0 auto; overflow: visible; }
@media (max-width: 480px) { .td-appbar .td-lang { display: none; } .td-brand__word { font-size: 20px; } }
/* Home news grid: 3 columns on desktop (home has no sidebar). */
@media (min-width: 1100px) { .td-home .td-grid--news { grid-template-columns: repeat(3, 1fr); } }
.td-band .tdc-m-qs__title { display: none; }
/* Sidebar with plugin modules: no double cards, single column, no empty boxes. */
.td-widget > p:empty { display: none; }
.td-widget:has(> p:only-child:empty), .td-widget:empty { display: none; }
.td-layout__side .td-widget:has(> .tdc), .td-layout__side .td-widget:has(> p:empty + .tdc) { padding: 0; background: none; border: 0; box-shadow: none; }
.td-layout__side .tdc-m-grid { grid-template-columns: 1fr !important; }
.td-layout__side .tdc-m-listings .tdc-m-card:nth-child(n+4) { display: none; }
.td-layout__side .tdc-tl-fmini__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- QA fixes (touch areas, spacing) ---------- */
.td-section-more, .td-apppage__back, a.td-badge { position: relative; }
.td-section-more::after, .td-apppage__back::after { content: ""; position: absolute; inset: -13px -8px; }
a.td-badge::after { content: ""; position: absolute; inset: -12px -4px; }
.td-dots button { position: relative; }
.td-dots button::after { content: ""; position: absolute; inset: -18px -4px; }
.td-apppage__back { min-height: 32px; }
/* Sticky bars inside pages (garage tabs, market toolbar, profile tabs) follow the app bar:
   when it hides on scroll they move up to the top edge instead of floating mid-air. */
body.td-bar-hidden .td-main { --td-appbar-h: env(safe-area-inset-top, 0px); }

/* ---------- QA 2: drawer & search sheet (icons inline with labels) ---------- */
.td-drawer__tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 2px 0 4px; }
.td-drawer__tools a { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 10px; border-radius: 14px; background: var(--td-surface-2); font-weight: 600; font-size: 14px; line-height: 1.2; }
.td-drawer__tools a:active { transform: scale(.98); }
@media (hover: hover) { .td-drawer__tools a:hover { color: var(--td-primary-ink); } }
.td-drawer__toolico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--td-primary) 14%, var(--td-surface)); color: var(--td-primary-ink); }
.td-drawer__langs button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.td-drawer__langs button[data-td-mode] .td-icon--sun { display: none; }
[data-theme="dark"] .td-drawer__langs button[data-td-mode] .td-icon--sun { display: block; }
[data-theme="dark"] .td-drawer__langs button[data-td-mode] .td-icon--moon { display: none; }
.td-drawer__head .td-brand__text { display: inline-flex; align-items: center; gap: 10px; }
.td-drawer__install { display: flex; align-items: center; justify-content: center; gap: 8px; }
.td-search__market { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 18px; border-radius: 16px; background: var(--td-surface-2); font-weight: 700; }
.td-search__market span { flex: 1; }
.td-search__market .td-icon:first-child { color: var(--td-primary-ink); }
.td-search__suggest .td-eyebrow { margin: 16px 0 8px; }
.td-search__suggest .td-chips__list { flex-wrap: wrap; }
/* On phones/tablets the sidebar falls under the article: keep it light (fuel prices only). */
@media (max-width: 1099px) { .td-layout__side .tdc-m-listings, .td-layout__side .tdc-gt { display: none; } }
/* Comment form */
.comment-respond { margin-top: var(--s7); padding: var(--pad); border-radius: var(--td-radius); background: var(--td-surface); border: 1px solid var(--td-line); }
.comment-reply-title { font: 800 22px/1.1 var(--td-font-display); text-transform: uppercase; margin: 0 0 8px; }
.comment-form .logged-in-as, .comment-notes { font-size: 14px; color: var(--td-muted); }
.comment-form .logged-in-as a { color: var(--td-primary-ink); }
.comment-form textarea, .comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url] { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--td-line); background: var(--td-bg); color: var(--td-text); font: 16px/1.4 var(--td-font); }
.comment-form textarea { min-height: 120px; }
.comment-form label { display: block; font-size: 13px; font-weight: 600; color: var(--td-muted); margin-bottom: 6px; }
/* App pages whose module shows its own title: no empty header band above it. */
.td-apppage__head:has(> .td-apppage__title.screen-reader-text:only-child) { margin: 0; }
.td-apppage:has(.td-apppage__title.screen-reader-text:only-child) { padding-top: var(--s3); }
/* QA 3: full-bleed horizontal rows keep the page margin while snapping (first/last card never touches the screen edge). */
.td-quick__grid { scroll-padding-inline: var(--gutter); }
@media (max-width: 767px) { .td-quick__grid::after { content: ""; flex: 0 0 1px; } }
@media (max-width: 1099px) { .td-topstories__track::after, .td-scroller--cards::after { content: ""; flex: 0 0 1px; } } /* end spacer: iOS ignores padding-right in scrollers */
/* Plugin carousels on phones/tablets: full-bleed like the theme rows, same 16/24px margin at rest and while snapping. */
@media (max-width: 1099px) {
	.td-container .tdc-m-listings.is-carousel > .tdc-scroller,
	.td-container .tdc-m-dstrip > .tdc-scroller,
	.td-container .tdc-gx__switch.tdc-scroller {
		margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
	}
	.td-container .tdc-m-listings.is-carousel > .tdc-scroller::after,
	.td-container .tdc-m-dstrip > .tdc-scroller::after,
	.td-container .tdc-gx__switch.tdc-scroller::after { content: ""; flex: 0 0 1px; }
}

/* QA 4: category filters live under the page title (news index, categories, tags). */
.td-archive-head__chips { margin: var(--s5) calc(var(--hp, var(--pad)) * -1) 0; }
.td-archive-head__chips .td-chips__list { padding-inline: var(--hp, var(--pad)); scroll-padding-inline: var(--hp, var(--pad)); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); }
.td-archive-head__chips .td-chips__list::after { content: ""; flex: 0 0 1px; }
.td-archive-head__chips .current-menu-item a, .td-archive-head__chips .current-cat a { background: var(--td-text); color: var(--td-bg); border-color: transparent; }
.td-archive-head__subs + .td-archive-head__chips { margin-top: var(--s3); }
/* QA 5 (accessibility): status colours used as text keep AA contrast in dark mode. */
[data-theme="dark"] { --td-ok-ink: #4ade80; --td-warn-ink: #fbbf24; --td-bad-ink: #f87171; }
[data-theme="light"] { --td-ok-ink: #0e7a39; --td-warn-ink: #8f5e00; --td-bad-ink: #b4232a; }
/* Carousel dots: 24px touch targets, the dot is drawn inside. */
.td-dots { gap: 0; }
.td-dots button { width: 24px; height: 24px; background: none; display: grid; place-items: center; }
.td-dots button::after { content: none; }
.td-dots button::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: var(--td-line); transition: width .25s var(--td-ease), background .25s; }
.td-dots button.is-active { width: 34px; background: none; }
.td-dots button.is-active::before { width: 22px; background: var(--td-primary); }

/* ==========================================================================
   Tendenza · Direzione C "Termometro" (scelta dell'utente 18/11/2026)
   Crema/inchiostro caldo, gradiente giallo → arancio → fucsia per la "temperatura" dei trend,
   Bricolage Grotesque per titoli e brand, Inter per i testi, JetBrains Mono per i dati. Forme morbide.
   ========================================================================== */
body { font-family: var(--td-font); }
h1, h2, h3, h4 { font-family: var(--td-font-display); font-weight: 800; letter-spacing: -.025em; text-transform: none; }
::selection { background: var(--td-heat-2); color: #fff; }
:focus-visible { outline: 2px solid var(--td-heat-2); outline-offset: 2px; }

/* Brand: wordmark con il punto caldo */
.td-brand__text { gap: 0; min-height: 44px; display: inline-flex; align-items: center; }
.td-brand__mark { display: none; }
.td-brand__word { font: 800 23px/1 var(--td-font-display); letter-spacing: -.035em; text-transform: none; }
.td-brand__word::after { content: "."; color: var(--td-heat-2); }

/* App bar */
.td-appbar { background: color-mix(in srgb, var(--td-bg) 88%, transparent); border-bottom: 0; }
.td-appbar.is-scrolled { border-bottom: 1px solid var(--td-line); }
.td-iconbtn { border-radius: 50%; background: var(--td-surface-2); width: 40px; height: 40px; margin-left: 4px; }
.td-appbar__menu { background: transparent; }
.td-nav__list > li > a { font: 600 14.5px/1 var(--td-font); text-transform: none; letter-spacing: 0; }
.td-nav__list > .current-menu-item > a, .td-nav__list > .current-menu-ancestor > a { box-shadow: none; color: var(--td-primary-ink); }
.td-nav__sep { width: 1px; height: 22px; background: var(--td-line); align-self: center; }
.td-nav__list--app > li > a { color: var(--td-primary-ink); }

/* Ticker "Ora" */
.td-ticker { background: transparent; border-bottom: 0; }
.td-ticker__inner { display: flex; align-items: center; gap: 12px; height: 38px; overflow: hidden; white-space: nowrap; font: 600 12.5px/1 var(--td-font); }
.td-ticker__tag { flex: none; display: inline-flex; align-items: center; gap: 6px; background: var(--td-heat); color: #fff; font: 700 10.5px/1 var(--td-font-mono); text-transform: uppercase; letter-spacing: .08em; padding: 6px 10px; border-radius: 999px; }
.td-ticker__dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: td-blink 1.6s infinite; }
@keyframes td-blink { 50% { opacity: .3; } }
.td-ticker__item { display: inline-flex; align-items: center; height: 38px; color: var(--td-text); }
.td-ticker__item:hover { color: var(--td-primary-ink); }
.td-ticker__sep { color: var(--td-muted); }
@media (max-width: 767px) { .td-ticker__item ~ .td-ticker__sep, .td-ticker__item ~ .td-ticker__sep ~ .td-ticker__item { display: none; } .td-ticker__item { overflow: hidden; text-overflow: ellipsis; } }

/* Eyebrow, meta, badge */
.td-eyebrow { font: 700 11px/1.2 var(--td-font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--td-muted); }
.td-badge { --td-badge: var(--td-heat-2); padding: 3px 9px; border-radius: 999px; font: 700 10.5px/1.3 var(--td-font-mono); letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, var(--td-badge) 75%, #000) !important; background: color-mix(in srgb, var(--td-badge) 14%, transparent) !important; }
[data-theme="dark"] .td-badge { color: color-mix(in srgb, var(--td-badge) 60%, #fff) !important; background: color-mix(in srgb, var(--td-badge) 22%, transparent) !important; }
.td-meta { font: 500 12px/1.3 var(--td-font); color: var(--td-muted); }
.td-meta__author { color: var(--td-text); font-weight: 600; }

/* Chip */
.td-chips__list a { height: 36px; padding: 0 15px; border-radius: 999px; background: var(--td-surface-2); border: 0; font: 600 13.5px/1 var(--td-font); }
.td-chips__list .current-menu-item a, .td-chips__list .current-cat a, .td-chips__list a[aria-current] { background: var(--td-heat-2); color: #fff; }
@media (hover: hover) { .td-chips__list a:hover { background: color-mix(in srgb, var(--td-heat-2) 16%, var(--td-surface-2)); } }

/* Bottoni */
.td-btn { border-radius: 999px; min-height: 46px; font: 700 15px/1 var(--td-font); letter-spacing: 0; text-transform: none; }
.td-btn--primary { background: var(--td-text); color: var(--td-bg); }
.td-btn--primary:hover { color: var(--td-bg); }
.td-btn--ghost { background: var(--td-surface); border: 1px solid var(--td-line); color: var(--td-text); }
.td-btn--accent { background: var(--td-heat-2); color: #fff; }
.td-btn--accent:hover { color: #fff; filter: brightness(1.05); }

/* Titoli di sezione */
.td-section-title, .td-widget__title { font: 800 21px/1.15 var(--td-font-display); letter-spacing: -.02em; text-transform: none; justify-content: space-between; }
.td-section-title::before, .td-widget__title::before, .td-widget > .wp-block-heading::before { content: none; }
.td-section-more { font: 600 13px/1 var(--td-font); color: var(--td-muted); margin-left: auto; }
.td-section-more::after { content: "→"; position: static; inset: auto; margin-left: 4px; }
.td-section-more { padding: 12px 0 12px 10px; margin-top: -12px; margin-bottom: -12px; }

/* Card articolo */
.td-card { border-radius: var(--td-radius); background: var(--td-surface); box-shadow: none; }
.td-card__media { border-radius: 0; background: var(--td-photo); }
.td-card__title { font: 700 18px/1.2 var(--td-font-display); letter-spacing: -.015em; }
.td-card__excerpt { color: var(--td-sub); }
.td-card__placeholder { background: var(--td-heat); color: #fff; }
.td-card--hero .td-card__title { text-transform: none; letter-spacing: -.025em; }
.td-scroller > .td-card { background: var(--td-surface); }
@media (max-width: 599px) {
	.td-grid { border-radius: var(--td-radius); box-shadow: none; }
	.td-grid .td-card__media { border-radius: 14px; }
	.td-grid .td-card__title { font-size: 16.5px; }
}

/* Home: apertura + Ultime */
.td-lead { display: grid; gap: 22px; padding-top: 8px; }
.td-lead__side .td-section-title { margin-top: 0; }
@media (min-width: 1100px) { .td-lead { grid-template-columns: 7fr 5fr; gap: 28px; padding-top: 24px; align-items: start; } }
.td-lead__main .td-card { box-shadow: none; }
.td-numlist { list-style: none; margin: 0; padding: 6px 14px; counter-reset: td-n; background: var(--td-surface); border-radius: var(--td-radius); }
.td-numlist li { counter-increment: td-n; }
.td-numlist li + li { border-top: 1px solid var(--td-line); }
.td-numlist a { display: grid; grid-template-columns: auto 1fr 76px; gap: 12px; align-items: center; padding: 12px 0; }
.td-numlist a::before { content: counter(td-n); font: 800 22px/1 var(--td-font-display); background: var(--td-heat); -webkit-background-clip: text; background-clip: text; color: transparent; min-width: 18px; }
.td-numlist__img { grid-column: 3; grid-row: 1; width: 76px; height: 56px; object-fit: cover; border-radius: 12px; background: var(--td-photo); }
.td-numlist__t { grid-column: 2; grid-row: 1; display: grid; gap: 3px; font: 700 15px/1.3 var(--td-font-display); letter-spacing: -.01em; }
.td-numlist__t small { font: 600 10.5px/1 var(--td-font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--td-muted); }

/* Strumenti */
.td-quick__grid { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.td-quick__grid::-webkit-scrollbar { display: none; }
.td-quick__item { flex: 0 0 150px; display: grid; gap: 4px; padding: 14px; border-radius: var(--td-radius); background: var(--td-surface); border: 0; }
.td-quick__item:first-child { background: var(--td-heat); color: #fff; }
.td-quick__item:first-child .td-quick__ico { background: rgba(255,255,255,.22); color: #fff; }
.td-quick__item:first-child .td-quick__hint { color: rgba(255,255,255,.9); }
.td-quick__ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--td-surface-2); color: var(--td-primary-ink); margin-bottom: 6px; }
.td-quick__label { font: 800 15px/1.15 var(--td-font-display); letter-spacing: -.01em; }
.td-quick__hint { font-size: 12px; color: var(--td-muted); line-height: 1.3; }
@media (min-width: 1100px) { .td-quick__grid { display: grid; grid-template-columns: repeat(5, 1fr); overflow: visible; } .td-quick__item { flex: none; } }

/* Bottom bar: Home · Radar · Hype · Watchlist · Profilo */
.td-bottombar { background: color-mix(in srgb, var(--td-bg) 92%, transparent); border-top: 1px solid var(--td-line); }
.td-bottombar__item { color: var(--td-muted); font: 600 10.5px/1 var(--td-font); }
.td-bottombar__item .td-icon { padding: 3px 14px; border-radius: 999px; }
.td-bottombar__item.is-active { color: var(--td-primary-ink); font-weight: 700; }
.td-bottombar__item.is-active .td-icon { color: var(--td-primary-ink); background: color-mix(in srgb, var(--td-heat-2) 14%, transparent); }

/* Archivi, pagine app, articolo */
.td-archive-head { --td-badge: var(--td-heat-2); background: var(--td-surface) !important; border-radius: var(--td-radius); padding: 22px; }
.td-archive-head::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--td-heat); }
.td-archive-head__title, .td-apppage__title { font-weight: 800; text-transform: none; letter-spacing: -.03em; }
.td-article__title { font: 800 clamp(28px, 7vw, 46px)/1.06 var(--td-font-display); text-transform: none; letter-spacing: -.03em; }
.td-prose blockquote { border-left: 4px solid var(--td-heat-2); font-family: var(--td-font-display); }
.td-prose a { color: var(--td-primary-ink); }
.td-progress { background: var(--td-heat); }
.td-404__code { font-weight: 800; background: var(--td-heat); -webkit-background-clip: text; background-clip: text; color: transparent; }
.td-404__code span { color: inherit; }

/* Footer, drawer, CTA app */
.td-footer { background: var(--td-surface); border-top: 0; border-radius: 28px 28px 0 0; }
.td-footer__h { font: 700 11px/1 var(--td-font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--td-muted); }
.td-drawer__panel { border-radius: 0 26px 26px 0; }
.td-drawer__toolico { background: var(--td-surface-2); color: var(--td-primary-ink); border-radius: 50%; }
.td-appcta { border-radius: 26px; background: var(--td-bar); color: var(--td-bar-text); padding: 24px; position: relative; overflow: hidden; }
.td-appcta::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: var(--td-heat); opacity: .9; }
.td-appcta__text { position: relative; z-index: 1; max-width: 520px; }
.td-appcta h2 { color: var(--td-bar-text); }
.td-appcta p { color: var(--td-bar-text); opacity: .8; }
.td-appcta .td-eyebrow { color: var(--td-heat-1); }
.td-appcta .td-btn--ghost { background: transparent; border-color: rgba(255,255,255,.3); color: var(--td-bar-text); }
.td-appcta__art { display: none; }
.td-toast { border-radius: 999px; }
.td-widget { border-radius: var(--td-radius); box-shadow: none; }

/* Nav desktop: magazine | app sulla stessa riga quando c'è spazio */
@media (min-width: 1100px) {
	.td-nav { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; overflow: hidden; }
	.td-nav__list { flex-wrap: nowrap; }
	.td-nav__list > li > a { padding: 0 10px; white-space: nowrap; }
	.td-appbar__actions { flex: none; }
}
@media (max-width: 1379px) { .td-nav__list--app, .td-nav__sep { display: none !important; } }
@media (max-width: 1099px) { .home.page .td-chips { display: block; } }

/* Banner cookie e pulsanti flottanti sopra la bottom bar */
@media (max-width: 1099px) {
	body.td-has-bottombar .td-totop { display: none !important; }
}
.td-hero { margin-bottom: 32px; }
