:root {
	--tmf-primary: var(--thriveo-color-accent, var(--wp--preset--color--primary, #E30B21));
	--tmf-secondary: var(--thriveo-color-secondary, var(--wp--preset--color--secondary, #FF751F));
	--tmf-accent: var(--wp--preset--color--accent, #FFDE59);
	--tmf-ink: var(--thriveo-color-text, var(--wp--preset--color--ink, #000000));
	--tmf-ink-soft: var(--wp--preset--color--ink-soft, #1A1412);
	--tmf-paper: var(--wp--preset--color--paper, #FFFFFF);
	--tmf-cream: var(--wp--preset--color--cream, #FFF6EE);
	--tmf-muted: var(--wp--preset--color--muted, #5B5552);
	--tmf-line: var(--wp--preset--color--line, #E7DFD9);
	--tmf-gradient: linear-gradient(90deg, var(--tmf-primary) 0%, var(--tmf-secondary) 100%);
	--tmf-overlay: linear-gradient(0deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.35) 55%, rgba(0, 0, 0, 0) 100%);
	--tmf-on-dark: var(--tmf-paper);
	--tmf-on-dark-soft: var(--tmf-line);
	--tmf-gutter: 1.25rem;
	--tmf-wide: 1200px;
	--tmf-transition: 0.2s ease;
	--tmf-font-heading: var(--thriveo-font-heading, var(--wp--preset--font-family--montserrat, system-ui, -apple-system, 'Segoe UI', sans-serif));
	--tmf-font-body: var(--thriveo-font-body, var(--wp--preset--font-family--raleway, system-ui, -apple-system, 'Segoe UI', sans-serif));
}

.tmf-section { margin-block-end: 4rem; }
.tmf-section__title {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-block-end: 1.5rem;
	font-size: var(--wp--preset--font-size--large, 1.375rem);
}
.tmf-section__title::after {
	content: "";
	flex: 1;
	height: 4px;
	background: var(--tmf-gradient);
}
.tmf-empty { color: var(--tmf-muted); }
.tmf-label,
.tmf-label a {
	display: inline-block;
	font-size: var(--wp--preset--font-size--small, .875rem);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--tmf-primary);
	text-decoration: none;
}
.tmf-label:hover,
.tmf-label a:hover { color: var(--tmf-ink); }
.tmf-date,
.tmf-card__date { margin: 0; font-size: var(--wp--preset--font-size--small, .875rem); color: var(--tmf-muted); }
.tmf-arrow-link { font-weight: 700; text-decoration: none; }
.tmf-arrow-link::after { content: " →"; }
.tmf-forum-link { margin: 1.5rem 0; }
.tmf-discussions__list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--tmf-line); border-radius: 4px; overflow: hidden; }
.tmf-discussion { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; padding: 0.9rem 1.1rem; background: var(--tmf-paper); }
.tmf-discussion:nth-child(even) { background: var(--tmf-cream); }
.tmf-discussion + .tmf-discussion { border-top: 1px solid var(--tmf-line); }
.tmf-discussion__title { font-family: var(--tmf-font-heading); font-weight: 800; color: var(--tmf-ink); text-decoration: none; }
.tmf-discussion__title:hover { color: var(--tmf-primary); }
.tmf-discussion__meta { font-size: var(--wp--preset--font-size--small, .875rem); color: var(--tmf-muted); }
.tmf-discussion__body { display: grid; gap: 0.35rem; min-width: 0; }
.tmf-discussion__labels { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: var(--wp--preset--font-size--small, .875rem); }
.tmf-discussion__category { padding: 0.05rem 0.55rem; color: var(--tmf-ink); background: var(--tmf-accent); border-radius: 999px; font-weight: 700; }
.tmf-discussion__consultant { color: var(--tmf-muted); font-weight: 700; }
a.tmf-discussion__consultant { color: var(--tmf-primary); text-decoration: none; }
a.tmf-discussion__consultant:hover { color: var(--tmf-ink); }
.tmf-tab__list[hidden] { display: none; }
.tmf-tab__list { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 2rem; border-bottom: 4px solid transparent; border-image: var(--tmf-gradient) 1; }
.tmf-tab__item { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.4rem; font-family: var(--tmf-font-heading); font-size: var(--wp--preset--font-size--medium, 1.125rem); font-weight: 800; color: var(--tmf-ink); background: transparent; border: 0; border-radius: 4px 4px 0 0; cursor: pointer; }
.tmf-tab__item:hover { color: var(--tmf-primary); }
.tmf-tab__item[aria-selected="true"] { color: var(--tmf-paper); background: var(--tmf-ink); }
.tmf-tab__count { padding: 0.05rem 0.6rem; font-size: var(--wp--preset--font-size--small, .875rem); color: var(--tmf-ink); background: var(--tmf-accent); border-radius: 999px; }
.tmf-tab-js .tmf-tab__title { display: none; }
.tmf-tab__panel[hidden] { display: none; }
.tmf-button--secondary { padding: 0.6rem 1.4rem; background: transparent; color: var(--tmf-ink); border: 2px solid var(--tmf-ink); }
.tmf-button--secondary:hover { background: var(--tmf-ink); color: var(--tmf-paper); }
.tmf-button[disabled] { opacity: 0.5; cursor: not-allowed; }
.tmf-archive__header { margin-block-end: 2.5rem; }
.tmf-archive__header .wp-block-query-title { margin: 0; }
.tmf-button {
	display: inline-block;
	padding: 0.85rem 1.8rem;
	font: inherit;
	font-weight: 700;
	color: var(--tmf-paper);
	background: var(--tmf-primary);
	border: 0;
	border-radius: 4px;
	cursor: pointer;
	text-decoration: none;
	transition: background var(--tmf-transition);
}
.tmf-button:hover { background: var(--tmf-ink); }

.tmf-page { padding-bottom: 4rem; }
.tmf-list { list-style: none; margin: 0; padding: 0; }
.tmf-list--grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem 1.5rem;
}
@media (min-width: 640px) { .tmf-list--grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .tmf-list--grid { grid-template-columns: repeat(3, 1fr); } }
.tmf-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--tmf-cream); }
.tmf-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--tmf-transition); }
.tmf-card__media:hover img { transform: scale(1.03); }
.tmf-card__media--empty { background: var(--tmf-gradient); }
.tmf-card__title { margin: 0.35rem 0; font-size: var(--wp--preset--font-size--medium, 1.125rem); line-height: 1.2; }
.tmf-card__title a { color: var(--tmf-ink); text-decoration: none; }
.tmf-card__title a:hover { color: var(--tmf-primary); }
.tmf-card--grid .tmf-card__text { padding-block-start: 0.75rem; }
.tmf-list--compact,
.tmf-list--side { display: grid; gap: 1.25rem; }
.tmf-card--compact { display: grid; grid-template-columns: 96px 1fr; gap: 1rem; align-items: center; }
.tmf-card--compact .tmf-card__title { font-size: var(--wp--preset--font-size--base, 1rem); }
.tmf-list--ranking { counter-reset: classifica; display: grid; gap: 0; }
.tmf-list--ranking > li {
	counter-increment: classifica;
	display: grid;
	grid-template-columns: 3.5rem 1fr;
	align-items: center;
	gap: 1rem;
	padding-block: 1rem;
	border-bottom: 1px solid var(--tmf-line);
}
.tmf-list--ranking > li::before {
	content: counter(classifica);
	font-size: var(--wp--preset--font-size--x-large, 1.75rem);
	font-family: var(--tmf-font-heading); font-weight: 800;
	line-height: 1;
	color: var(--tmf-primary);
}
.tmf-hero { display: grid; gap: 2px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .tmf-hero { grid-template-columns: 2fr 1fr; } }
.tmf-card--hero { position: relative; display: grid; min-height: 300px; background: var(--tmf-ink-soft); overflow: hidden; }
.tmf-card--hero .tmf-card__media { position: absolute; inset: 0; aspect-ratio: auto; }
.tmf-card--hero .tmf-card__text {
	position: relative;
	align-self: end;
	padding: 6rem 1.5rem 1.5rem;
	background: var(--tmf-overlay);
	color: var(--tmf-on-dark);
}
.tmf-card--hero .tmf-label,
.tmf-card--hero .tmf-label a { color: var(--tmf-accent); }
.tmf-card--hero .tmf-card__title { font-size: var(--wp--preset--font-size--x-large, 1.75rem); line-height: 1.1; }
.tmf-card--hero .tmf-card__title a { color: var(--tmf-on-dark); }
.tmf-card--hero .tmf-card__excerpt { margin: 0.5rem 0; color: var(--tmf-on-dark-soft); }
.tmf-card--hero .tmf-card__date { color: var(--tmf-on-dark-soft); }
.tmf-list--side { display: grid; gap: 2px; }
.tmf-list--side > li { display: grid; }
.tmf-card--side { min-height: 190px; }
.tmf-card--side .tmf-card__text { padding: 2.5rem 1rem 0.85rem; }
.tmf-card--side .tmf-card__title {
	margin: 0 0 0.15rem;
	font-size: var(--wp--preset--font-size--base, 1rem);
	line-height: 1.2;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
@media (min-width: 900px) {
	.tmf-hero .tmf-card--hero:not(.tmf-card--side) { min-height: 420px; }
	.tmf-list--side { grid-template-rows: repeat(3, 1fr); }
	.tmf-card--side { min-height: 0; }
}
.tmf-view { display: none; justify-content: flex-end; gap: 0.5rem; margin: 0 0 1rem; }
.tmf-articles--js .tmf-view { display: flex; }
.tmf-view__btn {
	padding: 0.45rem 1rem;
	font: inherit;
	font-size: var(--wp--preset--font-size--small, .875rem);
	font-weight: 700;
	color: var(--tmf-ink);
	background: var(--tmf-paper);
	border: 2px solid var(--tmf-line);
	border-radius: 4px;
	cursor: pointer;
}
.tmf-view__btn:hover { border-color: var(--tmf-ink); }
.tmf-view__btn[aria-pressed="true"] { color: var(--tmf-paper); background: var(--tmf-ink); border-color: var(--tmf-ink); }
.tmf-card--grid .tmf-card__excerpt { display: none; margin: 0.25rem 0 0.5rem; color: var(--tmf-muted); }
.tmf-articles[data-view="list"] .tmf-list--grid { grid-template-columns: 1fr; gap: 1.5rem; }
.tmf-articles[data-view="list"] .tmf-card--grid {
	display: grid;
	grid-template-columns: minmax(110px, 280px) 1fr;
	gap: 1.25rem;
	align-items: center;
}
.tmf-articles[data-view="list"] .tmf-card--grid .tmf-card__text { padding: 0; }
.tmf-articles[data-view="list"] .tmf-card--grid .tmf-card__excerpt { display: block; }
@media (max-width: 640px) {
	.tmf-articles[data-view="list"] .tmf-card--grid { grid-template-columns: 110px 1fr; gap: 0.85rem; }
	.tmf-articles[data-view="list"] .tmf-card--grid .tmf-card__excerpt { display: none; }
}
@media (min-width: 900px) {
	.tmf-articles--compact .tmf-list--compact { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 2.5rem; }
}
.tmf-category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; list-style: none; margin: 0; padding: 0; }
.tmf-category-grid--archive { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tmf-category-grid--home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tmf-category-box { display: flex; flex-direction: column; justify-content: space-between; gap: 0.75rem; min-height: 110px; padding: 1rem 1.1rem; background-repeat: no-repeat; background-position: right center; background-size: cover; border-radius: 4px; text-decoration: none; transition: transform var(--tmf-transition); }
.tmf-category-box:hover, .tmf-category-box:focus-visible { transform: translateY(-2px); }
.tmf-category-box__name { font-family: var(--tmf-font-heading); font-size: 1.05rem; font-weight: 800; line-height: 1.2; }
.tmf-category-box__counts { display: flex; flex-wrap: wrap; gap: 0.15rem 1rem; font-size: 0.85rem; }
.tmf-category-all { margin: 1.25rem 0 0; text-align: center; }
.tmf-page--categories .wp-block-post-title { margin: 0 0 1.5rem; font-size: clamp(1.75rem, 1rem + 2vw, 2.25rem); }
.tmf-category-header { padding: 1.5rem 0 2rem; text-align: center; }
.tmf-category-header__breadcrumb { margin: 0 0 0.5rem; font-size: var(--wp--preset--font-size--small, .875rem); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.tmf-category-header__breadcrumb a { color: var(--tmf-primary); text-decoration: none; }
.tmf-category-header__title { margin: 0; font-size: clamp(1.75rem, 1rem + 2.2vw, 2.5rem); text-align: center; }
.tmf-category-header__description { max-width: 60ch; margin: 0.75rem auto 0; color: var(--tmf-muted); }
.tmf-category-dialog { width: min(720px, calc(100% - 2rem)); max-height: 85vh; padding: 0; color: var(--tmf-ink); background: var(--tmf-paper); border: 0; border-radius: 4px; }
.tmf-category-dialog::backdrop { background: var(--tmf-ink); opacity: 0.6; }
.tmf-category-dialog__header { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--tmf-line); }
.tmf-category-dialog__title { flex: 1; margin: 0; font-size: 1.25rem; }
.tmf-category-dialog__close { padding: 0 0.6rem; font: inherit; font-size: 1.5rem; line-height: 1.4; color: var(--tmf-ink); background: transparent; border: 0; cursor: pointer; }
.tmf-category-dialog .tmf-tab__list { margin: 0; padding: 0 1.25rem; }
.tmf-category-dialog__panel { max-height: 55vh; padding: 1rem 1.25rem 1.25rem; overflow: auto; }
.tmf-category-list { margin: 0; padding: 0; list-style: none; }
.tmf-category-row { display: grid; gap: 0.1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--tmf-line); }
.tmf-category-row__title { font-weight: 700; color: var(--tmf-ink); text-decoration: none; }
.tmf-category-row__title:hover { color: var(--tmf-primary); }
.tmf-category-row__meta { font-size: var(--wp--preset--font-size--small, .875rem); color: var(--tmf-muted); }
@media (min-width: 700px) { .tmf-category-grid--home { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .tmf-category-grid--home { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
