/**
 * Turismo Malesia - long-form content (guides, reviews, news).
 *
 * Scoped to .entry-content (Kadence/Gutenberg output) and .tm-prose
 * (custom templates). Landing pages (body.tm-landing) are excluded, and
 * lists carrying an tm- class keep their component styling.
 */

body:not(.tm-landing) .entry-content,
.tm-prose {
	color: var(--tm-text-2);
	font-size: 1.0625rem; /* 17px: comfortable reading size */
	line-height: 1.7;
}

/* Vertical rhythm */
body:not(.tm-landing) .entry-content > * + *,
.tm-prose > * + * {
	margin-top: var(--tm-space-5);
	margin-bottom: 0;
}

/* Headings */
body:not(.tm-landing) .entry-content :is(h2, h3, h4, h5, h6),
.tm-prose :is(h2, h3, h4, h5, h6) {
	color: var(--tm-ink);
	scroll-margin-top: calc(var(--tm-header-h) + var(--tm-space-4));
}

body:not(.tm-landing) .entry-content > h2,
.tm-prose > h2 {
	margin-top: var(--tm-space-12);
	font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
}

body:not(.tm-landing) .entry-content > h3,
.tm-prose > h3 {
	margin-top: var(--tm-space-8);
	font-size: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
}

body:not(.tm-landing) .entry-content > h4,
.tm-prose > h4 {
	margin-top: var(--tm-space-6);
}

body:not(.tm-landing) .entry-content > :is(h2, h3, h4) + *,
.tm-prose > :is(h2, h3, h4) + * {
	margin-top: var(--tm-space-3);
}

body:not(.tm-landing) .entry-content > :first-child,
.tm-prose > :first-child {
	margin-top: 0;
}

/* Links inside text */
body:not(.tm-landing) .entry-content :is(p, li:not(.tm-toc__item), td) a:not(.tm-btn):not(.wp-element-button),
.tm-prose :is(p, li:not(.tm-toc__item), td) a:not(.tm-btn) {
	color: var(--tm-brand-dark);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgba(var(--tm-brand-rgb), 0.35);
}

body:not(.tm-landing) .entry-content :is(p, li:not(.tm-toc__item), td) a:not(.tm-btn):not(.wp-element-button):hover,
.tm-prose :is(p, li:not(.tm-toc__item), td) a:not(.tm-btn):hover {
	color: var(--tm-brand);
	text-decoration-color: currentColor;
}

/* Amazon disclosure line: muted link (same specificity, declared later) */
body:not(.tm-landing) .entry-content :is(p.tm-disclosure) a:not(.tm-btn):not(.wp-element-button) {
	color: var(--tm-text-2);
	font-weight: 600;
	text-decoration-color: currentColor;
}

/* Sources list at the end of articles: ul.tm-fonti under the "Fonti" h3 */
body:not(.tm-landing) .entry-content #fonti {
	font-size: var(--tm-fs-h5);
}

body:not(.tm-landing) .entry-content ul.tm-fonti {
	margin-left: 0;
	padding-left: 1.1em;
	color: var(--tm-text-muted);
	font-size: var(--tm-fs-sm);
	font-style: normal;
	line-height: 1.5;
}

body:not(.tm-landing) .entry-content ul.tm-fonti > li::marker {
	color: var(--tm-text-muted);
}

body:not(.tm-landing) .entry-content ul.tm-fonti > li + li {
	margin-top: var(--tm-space-1);
}

body:not(.tm-landing) .entry-content .tm-fonti :is(li) a:not(.tm-btn):not(.wp-element-button) {
	color: var(--tm-text-2);
	font-weight: 400;
	text-decoration-color: rgba(0, 0, 0, 0.2);
}

body:not(.tm-landing) .entry-content .tm-fonti :is(li) a:not(.tm-btn):not(.wp-element-button):hover {
	color: var(--tm-brand-dark);
	text-decoration-color: currentColor;
}

body:not(.tm-landing) .entry-content strong,
.tm-prose strong {
	color: var(--tm-ink);
}

/* Lists */
body:not(.tm-landing) .entry-content ul:not([class]),
body:not(.tm-landing) .entry-content ul.wp-block-list:not([class*="tm-"]),
.tm-prose ul {
	margin-left: 0;
	padding-left: 0;
	list-style: none;
}

body:not(.tm-landing) .entry-content ul:not([class]) > li,
body:not(.tm-landing) .entry-content ul.wp-block-list:not([class*="tm-"]) > li,
.tm-prose ul > li {
	position: relative;
	padding-left: 1.5em;
}

body:not(.tm-landing) .entry-content ul:not([class]) > li::before,
body:not(.tm-landing) .entry-content ul.wp-block-list:not([class*="tm-"]) > li::before,
.tm-prose ul > li::before {
	content: "";
	position: absolute;
	top: 0.68em;
	left: 0.25em;
	width: 7px;
	height: 7px;
	border-radius: 2px;
	background: var(--tm-brand);
}

/* Ordered lists: the number sits in a red slanted box (parallelogram). */
body:not(.tm-landing) .entry-content ol:not([class]),
body:not(.tm-landing) .entry-content ol.wp-block-list:not([class*="tm-"]),
.tm-prose ol {
	margin-left: 0;
	padding-left: 0;
	list-style: none;
	counter-reset: tm-ol;
}

body:not(.tm-landing) .entry-content ol:not([class]) > li,
body:not(.tm-landing) .entry-content ol.wp-block-list:not([class*="tm-"]) > li,
.tm-prose ol > li {
	position: relative;
	padding-left: 2.75em;
	counter-increment: tm-ol;
}

body:not(.tm-landing) .entry-content ol:not([class]) > li::before,
body:not(.tm-landing) .entry-content ol.wp-block-list:not([class*="tm-"]) > li::before,
.tm-prose ol > li::before {
	content: counter(tm-ol);
	position: absolute;
	top: 0.1em;
	left: 0;
	display: grid;
	place-items: center;
	width: 2.2em;
	height: 1.5em;
	background: var(--tm-brand);
	color: var(--tm-white);
	font-family: var(--tm-font-body);
	font-size: 0.9375em;
	font-weight: 600;
	line-height: 1;
	clip-path: polygon(22% 0, 100% 0, 78% 100%, 0 100%);
}

body:not(.tm-landing) .entry-content li + li,
.tm-prose li + li {
	margin-top: var(--tm-space-2);
}

/* Blockquote / pullquote */
body:not(.tm-landing) .entry-content blockquote,
.tm-prose blockquote {
	margin-inline: 0;
	padding: var(--tm-space-2) 0 var(--tm-space-2) var(--tm-space-5);
	border-left: 4px solid var(--tm-brand);
	color: var(--tm-ink);
	font-size: 1.125rem;
	font-weight: 600;
}

body:not(.tm-landing) .entry-content blockquote cite,
.tm-prose blockquote cite {
	display: block;
	margin-top: var(--tm-space-2);
	color: var(--tm-text-muted);
	font-size: var(--tm-fs-xs);
	font-style: normal;
}

/* Tables: horizontal scroll on small screens */
body:not(.tm-landing) .entry-content .wp-block-table,
.tm-prose .tm-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--tm-border);
	border-radius: var(--tm-radius-md);
	-webkit-overflow-scrolling: touch;
}

body:not(.tm-landing) .entry-content table,
.tm-prose table {
	min-width: 520px;
	margin: 0;
	font-size: var(--tm-fs-sm);
	line-height: 1.5;
}

body:not(.tm-landing) .entry-content .wp-block-table table {
	border: 0;
}

body:not(.tm-landing) .entry-content :is(th, td),
.tm-prose :is(th, td) {
	padding: var(--tm-space-3) var(--tm-space-4);
	border: 0;
	border-bottom: 1px solid var(--tm-border);
	text-align: left;
	vertical-align: top;
}

body:not(.tm-landing) .entry-content thead th,
.tm-prose thead th {
	border-bottom: 0;
	background: var(--tm-ink);
	color: var(--tm-white);
}

body:not(.tm-landing) .entry-content tbody tr:last-child td,
.tm-prose tbody tr:last-child td {
	border-bottom: 0;
}

body:not(.tm-landing) .entry-content tbody tr:nth-child(even),
.tm-prose tbody tr:nth-child(even) {
	background: var(--tm-gray-50);
}

body:not(.tm-landing) .entry-content .wp-block-table figcaption {
	padding: var(--tm-space-2) var(--tm-space-4);
}

/* Media */
body:not(.tm-landing) .entry-content :is(.wp-block-image, figure) img,
.tm-prose img {
	border-radius: var(--tm-radius-md);
}

body:not(.tm-landing) .entry-content figcaption,
.tm-prose figcaption {
	margin-top: var(--tm-space-2);
	color: var(--tm-text-muted);
	font-size: var(--tm-fs-xs);
	text-align: center;
}

/* Code (rare, but keep it tidy) */
body:not(.tm-landing) .entry-content :not(pre) > code,
.tm-prose :not(pre) > code {
	padding: 0.1em 0.35em;
	border-radius: 4px;
	background: var(--tm-gray-150);
	color: var(--tm-ink);
	font-size: 0.875em;
}

/* Gutenberg separators */
body:not(.tm-landing) .entry-content hr.wp-block-separator {
	margin-block: var(--tm-space-10);
	border: 0;
	background: var(--tm-border);
	height: 1px;
	opacity: 1;
}

/* ==========================================================================
   Editorial blocks (core blocks + tm- block styles, see inc/content-blocks.php)
   ========================================================================== */

/* Pros / cons: core/columns.is-style-tm-proscons, 1st column pros, 2nd cons */
.is-style-tm-proscons.wp-block-columns {
	gap: var(--tm-space-4);
}

.is-style-tm-proscons > .wp-block-column {
	padding: var(--tm-space-6);
	border-top: 4px solid var(--tm-success);
	border-radius: 0 0 var(--tm-radius-lg) var(--tm-radius-lg);
	background: var(--tm-success-tint);
}

.is-style-tm-proscons > .wp-block-column + .wp-block-column {
	border-top-color: var(--tm-danger);
	background: var(--tm-danger-tint);
}

.is-style-tm-proscons > .wp-block-column > * {
	margin: 0;
}

.is-style-tm-proscons > .wp-block-column > * + * {
	margin-top: var(--tm-space-4);
}

.is-style-tm-proscons > .wp-block-column > :is(h2, h3, h4) {
	color: var(--tm-success);
	font-size: var(--tm-fs-h5);
	text-transform: uppercase;
}

.is-style-tm-proscons > .wp-block-column + .wp-block-column > :is(h2, h3, h4) {
	color: var(--tm-danger);
}

body:not(.tm-landing) .entry-content .is-style-tm-proscons ul.wp-block-list > li,
.tm-prose .is-style-tm-proscons ul > li {
	padding-left: 30px;
	font-size: var(--tm-fs-sm);
	line-height: 1.55;
}

body:not(.tm-landing) .entry-content .is-style-tm-proscons ul.wp-block-list > li::before,
.tm-prose .is-style-tm-proscons ul > li::before {
	content: "✓";
	top: 0.1em;
	left: 0;
	display: grid;
	place-items: center;
	width: 19px;
	height: 19px;
	border-radius: var(--tm-radius-xs);
	background: var(--tm-success);
	color: var(--tm-white);
	font-size: var(--tm-fs-3xs);
	font-weight: 600;
	line-height: 1;
}

body:not(.tm-landing) .entry-content .is-style-tm-proscons .wp-block-column + .wp-block-column ul.wp-block-list > li::before,
.tm-prose .is-style-tm-proscons .wp-block-column + .wp-block-column ul > li::before {
	content: "✕";
	background: var(--tm-danger);
}

/* Tip / callout: core/group.is-style-tm-tip */
.is-style-tm-tip {
	padding: var(--tm-space-6);
	border-top: 4px solid var(--tm-brand);
	border-radius: 0 0 var(--tm-radius-lg) var(--tm-radius-lg);
	background: var(--tm-gray-100);
}

.is-style-tm-tip > *,
.is-style-tm-tip > .wp-block-group__inner-container > * {
	margin: 0;
}

.is-style-tm-tip > * + *,
.is-style-tm-tip > .wp-block-group__inner-container > * + * {
	margin-top: var(--tm-space-3);
}

.is-style-tm-tip > :is(h2, h3, h4):first-child,
.is-style-tm-tip > .wp-block-group__inner-container > :is(h2, h3, h4):first-child {
	font-size: var(--tm-fs-h5);
	text-transform: uppercase;
}

/* ==========================================================================
   Article furniture: meta line, table of contents, key-takeaways box
   (injected by inc/article.php; box pattern in /patterns/riepilogo.php)
   ========================================================================== */

/* "Aggiornato il ... · di ..." */
.tm-article-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--tm-space-2) var(--tm-space-3);
	margin: 0 0 var(--tm-space-6) !important;
	padding-bottom: var(--tm-space-4);
	border-bottom: 1px solid var(--tm-border);
	color: var(--tm-text-muted);
	font-size: var(--tm-fs-sm);
}

.tm-article-meta__item {
	display: inline-flex;
	gap: 0.35em;
}

.tm-article-meta__item + .tm-article-meta__item::before {
	content: "·";
	margin-right: var(--tm-space-2);
	color: var(--tm-text-disabled);
}

.tm-article-meta a {
	color: var(--tm-brand-dark);
	font-weight: 600;
	text-decoration: none;
}

.tm-article-meta a:hover {
	text-decoration: underline;
}

/* Table of contents */
.tm-toc {
	margin: 0 0 var(--tm-space-8);
	padding: var(--tm-space-5) var(--tm-space-6);
	border: 1px solid var(--tm-border);
	border-radius: var(--tm-radius-md);
	background: var(--tm-gray-50);
}

.tm-toc__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--tm-space-3);
	margin: 0;
	font-family: var(--tm-font-body);
	font-size: var(--tm-fs-2xs);
	font-weight: 500;
	text-transform: none;
	letter-spacing: var(--tm-ls-kicker);
	color: var(--tm-text-muted);
	list-style: none;
	cursor: pointer;
	user-select: none;
}

.tm-toc__title::-webkit-details-marker {
	display: none;
}

/* Chevron: points down when closed, up when open */
.tm-toc__title::after {
	content: "";
	flex: none;
	width: 0.55em;
	height: 0.55em;
	margin-top: -0.25em;
	border-right: 2px solid var(--tm-brand);
	border-bottom: 2px solid var(--tm-brand);
	transform: rotate(45deg);
	transition: transform 0.2s ease, margin 0.2s ease;
}

.tm-toc__details[open] > .tm-toc__title::after {
	margin-top: 0.25em;
	transform: rotate(-135deg);
}

.tm-toc__title:hover {
	color: var(--tm-text-2);
}

.tm-toc__title:focus-visible {
	outline: 2px solid var(--tm-brand);
	outline-offset: 4px;
	border-radius: 2px;
}

.tm-toc__details[open] > .tm-toc__list {
	margin-top: var(--tm-space-3);
}

.tm-toc__list {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: tm-toc;
}

@media (min-width: 720px) {
	.tm-toc__list {
		columns: 2;
		column-gap: var(--tm-space-8);
	}
}

.tm-toc__item {
	counter-increment: tm-toc;
	margin: 0;
	padding: 0;
	break-inside: avoid;
}

.tm-toc__item + .tm-toc__item {
	margin-top: var(--tm-space-2);
}

.tm-toc__item a {
	display: flex;
	gap: 0.55em;
	align-items: baseline;
	color: var(--tm-text-2);
	font-size: var(--tm-fs-sm);
	font-weight: 600;
	text-decoration: none;
}

.tm-toc__item a::before {
	content: counter(tm-toc, decimal-leading-zero);
	color: var(--tm-brand);
	font-family: var(--tm-font-body);
	font-weight: 600;
	font-size: var(--tm-fs-xs);
}

.tm-toc__item a:hover {
	color: var(--tm-brand-dark);
}

/* Key takeaways: core/group.is-style-tm-riepilogo */
.is-style-tm-riepilogo {
	padding: var(--tm-space-6);
	border: 1px solid var(--tm-border);
	border-left: 4px solid var(--tm-brand);
	border-radius: var(--tm-radius-md);
	background: var(--tm-gray-50);
}

.is-style-tm-riepilogo > *,
.is-style-tm-riepilogo > .wp-block-group__inner-container > * {
	margin: 0;
}

.is-style-tm-riepilogo > * + *,
.is-style-tm-riepilogo > .wp-block-group__inner-container > * + * {
	margin-top: var(--tm-space-3);
}

.is-style-tm-riepilogo > :is(h2, h3):first-child,
.is-style-tm-riepilogo > .wp-block-group__inner-container > :is(h2, h3):first-child {
	font-family: var(--tm-font-display);
	font-size: var(--tm-fs-h5);
	text-transform: uppercase;
	letter-spacing: var(--tm-ls-label);
}

body:not(.tm-landing) .entry-content .is-style-tm-riepilogo ul.wp-block-list > li,
.tm-prose .is-style-tm-riepilogo ul > li {
	padding-left: 28px;
	font-size: var(--tm-fs-sm);
	line-height: 1.55;
}

body:not(.tm-landing) .entry-content .is-style-tm-riepilogo ul.wp-block-list > li::before,
.tm-prose .is-style-tm-riepilogo ul > li::before {
	content: "✓";
	top: 0.15em;
	left: 0;
	display: grid;
	place-items: center;
	width: 18px;
	height: 18px;
	border-radius: var(--tm-radius-xs);
	background: var(--tm-brand);
	color: var(--tm-white);
	font-size: var(--tm-fs-3xs);
	font-weight: 600;
	line-height: 1;
}

/* ==========================================================================
   Editorial callouts: worked example (dark), highlight figure, warning.
   Registered in inc/blocks.php. Each rule needs the Kadence twin selector,
   because the classic theme wraps group children in
   .wp-block-group__inner-container (see layout.css).
   ========================================================================== */

/* Worked example: core/group.is-style-tm-esempio */
.is-style-tm-esempio {
	padding: var(--tm-space-7) var(--tm-space-6);
	border-radius: var(--tm-radius-lg);
	background: var(--tm-ink);
	color: var(--tm-on-dark);
}

.is-style-tm-esempio > *,
.is-style-tm-esempio > .wp-block-group__inner-container > * {
	margin: 0;
}

.is-style-tm-esempio > * + *,
.is-style-tm-esempio > .wp-block-group__inner-container > * + * {
	margin-top: var(--tm-space-4);
}

/* The heading becomes the label chip at the top of the box. */
.is-style-tm-esempio > :is(h2, h3, h4):first-child,
.is-style-tm-esempio > .wp-block-group__inner-container > :is(h2, h3, h4):first-child {
	display: inline-block;
	padding: var(--tm-space-1) var(--tm-space-3);
	border-radius: var(--tm-radius-xs);
	background: var(--tm-brand);
	color: var(--tm-white);
	font-family: var(--tm-font-body);
	font-size: var(--tm-fs-2xs);
	font-weight: 600;
	letter-spacing: var(--tm-ls-kicker);
	text-transform: uppercase;
}

.is-style-tm-esempio :is(p, li) {
	color: var(--tm-on-dark);
}

.is-style-tm-esempio strong {
	color: var(--tm-white);
}

.is-style-tm-esempio a {
	color: var(--tm-brand-light);
}

body:not(.tm-landing) .entry-content .is-style-tm-esempio .wp-block-table,
.tm-prose .is-style-tm-esempio .tm-table-wrap {
	border-color: var(--tm-on-dark-border);
}

body:not(.tm-landing) .entry-content .is-style-tm-esempio :is(th, td),
.tm-prose .is-style-tm-esempio :is(th, td) {
	border-bottom-color: var(--tm-on-dark-border);
}

body:not(.tm-landing) .entry-content .is-style-tm-esempio thead th,
.tm-prose .is-style-tm-esempio thead th {
	background: var(--tm-ink-3);
}

body:not(.tm-landing) .entry-content .is-style-tm-esempio tbody tr:nth-child(even),
.tm-prose .is-style-tm-esempio tbody tr:nth-child(even) {
	background: var(--tm-ink-2);
}

/* Ordered steps inside the box keep the red counter on dark. */
body:not(.tm-landing) .entry-content .is-style-tm-esempio ol.wp-block-list > li::before,
.tm-prose .is-style-tm-esempio ol > li::before {
	background: var(--tm-brand);
	color: var(--tm-white);
}

body:not(.tm-landing) .entry-content .is-style-tm-esempio ul.wp-block-list > li::before,
.tm-prose .is-style-tm-esempio ul > li::before {
	background: var(--tm-brand-light);
}

/* Highlight figure: core/group.is-style-tm-dato
   First paragraph = the number, the rest = the caption. */
.is-style-tm-dato {
	display: flex;
	gap: var(--tm-space-5);
	align-items: center;
	padding: var(--tm-space-6);
	border-left: 6px solid var(--tm-brand);
	border-radius: 0 var(--tm-radius-md) var(--tm-radius-md) 0;
	background: var(--tm-brand-tint);
}

.is-style-tm-dato > .wp-block-group__inner-container {
	display: flex;
	gap: var(--tm-space-5);
	align-items: center;
	width: 100%;
}

.is-style-tm-dato > *,
.is-style-tm-dato > .wp-block-group__inner-container > * {
	margin: 0 !important;
}

.is-style-tm-dato > p:first-child,
.is-style-tm-dato > .wp-block-group__inner-container > p:first-child {
	flex: 0 0 auto;
	max-width: 42%;
	color: var(--tm-brand-dark);
	font-family: var(--tm-font-display);
	font-size: var(--tm-fs-h2);
	font-weight: 500;
	letter-spacing: var(--tm-ls-display);
	line-height: var(--tm-lh-tight);
	text-transform: uppercase;
}

.is-style-tm-dato > p:first-child + p,
.is-style-tm-dato > .wp-block-group__inner-container > p:first-child + p {
	color: var(--tm-text-2);
	font-size: var(--tm-fs-sm);
	line-height: 1.55;
}

@media (max-width: 719px) {
	.is-style-tm-dato,
	.is-style-tm-dato > .wp-block-group__inner-container {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--tm-space-3);
	}

	.is-style-tm-dato > p:first-child,
	.is-style-tm-dato > .wp-block-group__inner-container > p:first-child {
		max-width: none;
	}
}

/* Warning: core/group.is-style-tm-avviso */
.is-style-tm-avviso {
	padding: var(--tm-space-6);
	border: 1px solid #f0dcb4;
	border-left: 4px solid var(--tm-warning);
	border-radius: var(--tm-radius-md);
	background: var(--tm-warning-tint);
}

.is-style-tm-avviso > *,
.is-style-tm-avviso > .wp-block-group__inner-container > * {
	margin: 0;
}

.is-style-tm-avviso > * + *,
.is-style-tm-avviso > .wp-block-group__inner-container > * + * {
	margin-top: var(--tm-space-3);
}

.is-style-tm-avviso > :is(h2, h3, h4):first-child,
.is-style-tm-avviso > .wp-block-group__inner-container > :is(h2, h3, h4):first-child {
	color: var(--tm-warning);
	font-family: var(--tm-font-display);
	font-size: var(--tm-fs-h5);
	letter-spacing: var(--tm-ls-label);
	text-transform: uppercase;
}

.is-style-tm-avviso > :is(h2, h3, h4):first-child::before,
.is-style-tm-avviso > .wp-block-group__inner-container > :is(h2, h3, h4):first-child::before {
	content: "!";
	display: inline-grid;
	place-items: center;
	width: 20px;
	height: 20px;
	margin-right: var(--tm-space-2);
	border-radius: 50%;
	background: var(--tm-warning);
	color: var(--tm-white);
	font-size: var(--tm-fs-2xs);
	vertical-align: 1px;
}

/* Number tables that must fit a phone without sideways scroll
   (add the class "tm-table-fit" to the table block). */
body:not(.tm-landing) .entry-content .tm-table-fit table {
	min-width: 0;
}

body:not(.tm-landing) .entry-content .tm-table-fit :is(th, td):not(:first-child) {
	white-space: nowrap;
	text-align: right;
}

body:not(.tm-landing) .entry-content .tm-table-fit small {
	color: var(--tm-text-muted);
	font-size: var(--tm-fs-xs);
}

@media (max-width: 767px) {
	body:not(.tm-landing) .entry-content .tm-table-fit :is(th, td) {
		padding: var(--tm-space-2) var(--tm-space-2);
		font-size: var(--tm-fs-xs);
	}
}

/* Cards: core/columns.is-style-tm-cards. One card per column, stacked on phones. */
body:not(.tm-landing) .entry-content .wp-block-columns.is-style-tm-cards {
	gap: var(--tm-space-4);
	margin-block: var(--tm-space-6);
}

body:not(.tm-landing) .entry-content .is-style-tm-cards > .wp-block-column {
	padding: var(--tm-space-5);
	border: 1px solid var(--tm-border);
	border-top: 4px solid var(--tm-brand);
	border-radius: var(--tm-radius-md);
	background: var(--tm-white);
}

body:not(.tm-landing) .entry-content .is-style-tm-cards > .wp-block-column > * {
	margin: 0;
}

body:not(.tm-landing) .entry-content .is-style-tm-cards > .wp-block-column > * + * {
	margin-top: var(--tm-space-2);
}

body:not(.tm-landing) .entry-content .is-style-tm-cards p.tm-card-note {
	color: var(--tm-text-muted);
	font-size: var(--tm-fs-sm);
}

/* Flow: core/list.is-style-tm-flow (ordered). Numbered steps on one wrapping row. */
body:not(.tm-landing) .entry-content ol.is-style-tm-flow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--tm-space-2) var(--tm-space-3);
	margin: var(--tm-space-5) 0;
	padding: 0;
	list-style: none;
	counter-reset: tm-flow;
}

body:not(.tm-landing) .entry-content ol.is-style-tm-flow > li {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	margin: 0;
	padding: 0;
	color: var(--tm-ink);
	font-size: var(--tm-fs-sm);
	font-weight: 600;
	line-height: 1.2;
	counter-increment: tm-flow;
}

body:not(.tm-landing) .entry-content ol.is-style-tm-flow > li::before {
	content: counter(tm-flow);
	display: inline-grid;
	place-items: center;
	width: 1.7em;
	height: 1.7em;
	border-radius: 50%;
	background: var(--tm-brand);
	color: var(--tm-white);
	font-size: var(--tm-fs-xs);
	font-weight: 600;
}

body:not(.tm-landing) .entry-content ol.is-style-tm-flow > li:not(:last-child)::after {
	content: "→";
	margin-left: 0.35em;
	color: var(--tm-text-muted);
	font-weight: 400;
}

/* Bar chart in HTML: <figure class="tm-bars"> with one .tm-bars__row per value.
   Text stays at body size on phones; bar width = share of the scale maximum. */
body:not(.tm-landing) .entry-content .tm-bars {
	max-width: 620px;
	margin: var(--tm-space-6) auto;
}

body:not(.tm-landing) .entry-content .tm-bars__row {
	display: grid;
	grid-template-columns: 7.5em minmax(0, 1fr) 3.6em;
	align-items: center;
	gap: var(--tm-space-2);
	margin: 0 0 var(--tm-space-2);
	font-size: var(--tm-fs-sm);
	line-height: 1.2;
}

body:not(.tm-landing) .entry-content .tm-bars__label {
	color: var(--tm-text-2);
	text-align: right;
}

body:not(.tm-landing) .entry-content .tm-bars__track {
	display: block;
	height: 1.15em;
	border-radius: 999px;
	background: var(--tm-gray-50);
	overflow: hidden;
}

body:not(.tm-landing) .entry-content .tm-bars__bar {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--tm-brand);
}

body:not(.tm-landing) .entry-content .tm-bars__value {
	color: var(--tm-ink);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

body:not(.tm-landing) .entry-content .tm-bars__row.is-eu .tm-bars__bar {
	background: var(--tm-ink);
}

body:not(.tm-landing) .entry-content .tm-bars__row.is-it .tm-bars__bar {
	background: #e08e00;
}

body:not(.tm-landing) .entry-content .tm-bars__row.is-eu .tm-bars__label,
body:not(.tm-landing) .entry-content .tm-bars__row.is-it .tm-bars__label {
	color: var(--tm-ink);
	font-weight: 600;
}

body:not(.tm-landing) .entry-content .tm-bars figcaption {
	margin-top: var(--tm-space-3);
	color: var(--tm-text-muted);
	font-size: var(--tm-fs-xs);
	text-align: center;
}

/* Glossary (inc/glossary.php, assets/js/glossary.js) */
body:not(.tm-landing) .entry-content .tm-glossary__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--tm-space-2) var(--tm-space-4);
	margin: 0 0 var(--tm-space-3);
	scroll-margin-top: var(--tm-space-6);
}

body:not(.tm-landing) .entry-content .tm-glossary__search {
	flex: 1 1 260px;
	margin: 0;
}

body:not(.tm-landing) .entry-content .tm-glossary__search input {
	width: 100%;
	padding: 0.7em 1em;
	border: 1px solid var(--tm-border);
	border-radius: 999px;
	background: var(--tm-white);
	font: inherit;
}

body:not(.tm-landing) .entry-content .tm-glossary__status {
	margin: 0;
	color: var(--tm-text-muted);
	font-size: var(--tm-fs-sm);
}

body:not(.tm-landing) .entry-content .tm-glossary__nav {
	position: sticky;
	top: 0;
	z-index: 5;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 var(--tm-space-6);
	padding: var(--tm-space-3) 0;
	background: var(--tm-white);
	border-bottom: 1px solid var(--tm-border);
}

body:not(.tm-landing) .entry-content .tm-glossary__nav :is(a, span, button) {
	display: inline-grid;
	place-items: center;
	min-width: 2.2em;
	height: 2.2em;
	padding: 0 0.5em;
	border: 1px solid var(--tm-border);
	border-radius: 8px;
	background: var(--tm-white);
	color: var(--tm-ink);
	font: inherit;
	font-size: var(--tm-fs-sm);
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

body:not(.tm-landing) .entry-content .tm-glossary__nav span {
	color: var(--tm-border);
	cursor: default;
}

body:not(.tm-landing) .entry-content .tm-glossary__nav :is(a, button):hover {
	border-color: var(--tm-brand);
	color: var(--tm-brand);
}

body:not(.tm-landing) .entry-content .tm-glossary__nav :is(a[aria-current="true"], button[aria-pressed="true"]) {
	border-color: var(--tm-brand);
	background: var(--tm-brand);
	color: var(--tm-white);
}

body:not(.tm-landing) .entry-content .tm-glossary__letter {
	margin: var(--tm-space-8) 0 var(--tm-space-3);
	padding-bottom: var(--tm-space-2);
	border-bottom: 3px solid var(--tm-brand);
	color: var(--tm-brand);
	font-size: var(--tm-fs-h2);
	scroll-margin-top: 80px;
}

body:not(.tm-landing) .entry-content .tm-glossary__list {
	margin: 0;
}

body:not(.tm-landing) .entry-content .tm-glossary__item {
	padding: var(--tm-space-3) 0;
	border-bottom: 1px solid var(--tm-border);
	scroll-margin-top: 80px;
}

body:not(.tm-landing) .entry-content .tm-glossary__item.is-target {
	background: var(--tm-brand-tint);
}

body:not(.tm-landing) .entry-content .tm-glossary__item dt {
	margin: 0 0 0.2em;
	color: var(--tm-ink);
	font-weight: 600;
}

body:not(.tm-landing) .entry-content .tm-glossary__item dd {
	margin: 0;
	color: var(--tm-text-2);
}

body:not(.tm-landing) .entry-content .tm-glossary__empty {
	padding: var(--tm-space-6) 0;
	color: var(--tm-text-muted);
	text-align: center;
}

/* Phones: the A-Z bar stays one row and scrolls sideways, so the sticky bar is short */
@media (max-width: 767px) {
	body:not(.tm-landing) .entry-content .tm-glossary__nav {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	body:not(.tm-landing) .entry-content .tm-glossary__nav::-webkit-scrollbar {
		display: none;
	}

	body:not(.tm-landing) .entry-content .tm-glossary__nav > * {
		flex: 0 0 auto;
	}
}
