/*
 * Content styles in the "Linkalab New" design system: forest and mint, the
 * node thread of the wordmark ("il filo") as the path through steps.
 * Colors fall back to the design-system values, whatever the theme.
 */
:root {
	--lb-forest-950: #07251a;
	--lb-forest-900: #0f3d2d;
	--lb-forest-800: #14503b;
	--lb-forest-700: #1a6549;
	--lb-mint-500: #5dbe8e;
	--lb-mint-100: #e6f5ee;
	--lb-mint-ink: #aff1d0;
	--lb-neutral-600: #586863;
	--lb-neutral-200: #dee6e2;
	--lb-neutral-50: #f7f9f8;
	--lb-display: "Space Grotesk", Manrope, system-ui, sans-serif;
	--lb-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
	--lb-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/*
 * "Card": a white surface with a subtle border and a soft green shadow;
 * it lifts when it holds a link.
 */
.is-style-card {
	position: relative;
	border: 1px solid var(--lb-neutral-200);
	border-radius: 14px;
	padding: clamp(1.25rem, 2vw, 1.5rem);
	background-color: #fff;
	box-shadow: 0 1px 3px rgba(10, 19, 15, 0.08), 0 1px 2px rgba(10, 19, 15, 0.04);
	transition: box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1), transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.is-style-card.has-background {
	border-color: transparent;
}

/* Wins over the zero side padding WordPress gives nested constrained groups. */
.wp-block-group.is-style-card,
.wp-block-column.is-style-card {
	padding: clamp(1.25rem, 2vw, 1.5rem);
}

.is-style-card:has(a):hover {
	box-shadow: 0 12px 28px rgba(10, 19, 15, 0.12), 0 4px 8px rgba(10, 19, 15, 0.05);
	transform: translateY(-2px);
}

.wp-block-cover.is-style-card {
	border: 0;
	border-radius: 20px;
	overflow: hidden;
}

.is-style-card .wp-block-post-featured-image img,
.is-style-card > .wp-block-image img {
	border-radius: 10px;
}

/* A card inside a card is never a second box: it keeps only its content. */
.is-style-card .is-style-card,
.is-style-card .wp-block-group.is-style-card {
	border: 0;
	border-radius: 0;
	padding: 0;
	background-color: transparent;
	box-shadow: none;
	transform: none;
}

/* In a narrow card, side-by-side columns stack. */
.wp-block-group.is-style-card,
.linkalab-punto {
	container-type: inline-size;
}

@container (max-width: 30rem) {
	:where(.is-style-card, .linkalab-punto) .wp-block-columns {
		flex-wrap: wrap !important;
	}

	:where(.is-style-card, .linkalab-punto) .wp-block-columns > .wp-block-column {
		flex-basis: 100% !important;
	}
}

/* Horizontal cards (image and text side by side) wrap only when narrow. */
.is-style-card.is-layout-flex:not(.is-vertical) > .wp-block-group {
	flex: 1 1 18rem;
	min-width: 0;
}

/* "Gradiente": no gradient text in this system; the heading stays forest. */
.is-style-gradient {
	color: var(--lb-forest-950);
}

.gradiente {
	color: inherit;
}

/* "Accento" button: the one mint call to action of a section. */
.wp-block-button.is-style-accent > .wp-block-button__link {
	background: var(--lb-mint-500);
	color: var(--lb-forest-950);
	border-color: transparent;
}

.wp-block-button.is-style-accent > .wp-block-button__link:hover,
.wp-block-button.is-style-accent > .wp-block-button__link:focus-visible {
	background: #45ae80;
	color: var(--lb-forest-950);
}

/*
 * "Linea": the thread. A 2px mint line through hollow nodes, one per step;
 * the item with class "is-linea" names the path and carries its action,
 * the item with class "is-capolinea" is the lit node where the path
 * arrives. Below 782px threads run vertically.
 */
:where(.is-style-linea, .is-style-linea-verticale) {
	--filo: var(--lb-mint-500);
	--nodo-fondo: #fff;
	--nome: var(--lb-forest-950);
	--testo: var(--lb-neutral-600);
	--r: 10px;
	--capolinea: 9rem;
	position: relative;
	list-style: none;
	margin: 0;
	padding: 0;
}

.is-style-linea {
	display: flex;
	justify-content: space-between;
	gap: 1.5rem;
}

.is-style-linea {
	--gap: 1.5rem;
}

/* The thread runs from node to node: each stop draws the segment to the next. */
.is-style-linea > li:not(.is-linea, :last-child)::after {
	content: "";
	position: absolute;
	left: calc(2 * var(--r));
	right: calc(-1 * var(--gap));
	top: calc(var(--r) - 1px);
	height: 2px;
	background: var(--filo);
	transform-origin: left center;
}

.is-style-linea > li {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	padding-top: calc(2 * var(--r) + 1rem);
	color: var(--testo);
	font-size: 0.9375rem;
	line-height: 1.45;
}

:where(.is-style-linea, .is-style-linea-verticale) > li::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	box-sizing: border-box;
	width: calc(2 * var(--r));
	height: calc(2 * var(--r));
	border: 3px solid var(--filo);
	border-radius: 50%;
	background: var(--nodo-fondo);
}

:where(.is-style-linea, .is-style-linea-verticale) > li > strong {
	display: block;
	margin-bottom: 0.25rem;
	font-family: var(--lb-display);
	font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.2;
	color: var(--nome);
}

:where(.is-style-linea, .is-style-linea-verticale) > li > strong a {
	color: inherit;
	text-decoration: none;
	background-image: linear-gradient(var(--filo), var(--filo));
	background-size: 0 2px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	transition: background-size 0.3s var(--lb-ease);
}

:where(.is-style-linea, .is-style-linea-verticale) > li > strong a:hover,
:where(.is-style-linea, .is-style-linea-verticale) > li > strong a:focus-visible {
	background-size: 100% 2px;
}

/* The path's name, in mono, with its action under it. */
.is-style-linea > li.is-linea {
	flex: 0 0 var(--targa, auto);
	align-self: flex-start;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.875rem;
	padding: 0 1rem 0 0;
}

.is-style-linea > li.is-linea > strong {
	margin: 0;
	min-height: calc(2 * var(--r));
	display: flex;
	align-items: center;
	font-family: var(--lb-mono);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--lb-forest-700);
}

.is-style-linea > li.is-linea > a {
	padding: 0.75rem 1.125rem;
	border-radius: 10px;
	background: var(--lb-forest-900);
	color: #fff;
	font-weight: 600;
	font-size: 0.9375rem;
	text-decoration: none;
	line-height: 1.2;
	box-shadow: 0 1px 2px rgba(10, 19, 15, 0.06);
	transition: background-color 0.12s cubic-bezier(0.2, 0, 0, 1);
}

.is-style-linea > li.is-linea > a:hover,
.is-style-linea > li.is-linea > a:focus-visible {
	background: var(--lb-forest-800);
}

:where(.is-style-linea, .is-style-linea-verticale) > li.is-linea::before {
	content: none;
}

/* The lit node: full mint with a ring, the one stop the story arrives at. */
.is-style-linea > li.is-capolinea {
	flex: 0 0 var(--capolinea);
}

:where(.is-style-linea, .is-style-linea-verticale) > li.is-capolinea::before {
	border: 0;
	background: var(--filo);
	box-shadow: 0 0 0 7px rgba(93, 190, 142, 0.22);
}

/* Two threads in a "Rete" group join into the lit node of the last one. */
.is-style-rete {
	--r: 10px;
	--capolinea: 9rem;
	--riga: 8.5rem;
	--targa: 13rem;
	position: relative;
	display: grid;
	row-gap: 2.5rem;
}

.is-style-rete > .is-style-linea {
	z-index: 1;
	min-height: var(--riga);
	margin: 0;
}

.is-style-rete > .is-style-linea:not(:has(> .is-capolinea)) {
	padding-right: var(--capolinea);
}

/* The upper thread runs on and bends down into the lit node. */
.is-style-rete > .is-style-linea:not(:has(> .is-capolinea)) > li:last-child::after {
	content: "";
	position: absolute;
	left: calc(2 * var(--r));
	right: calc(-1 * var(--r) - 1px);
	top: calc(var(--r) - 1px);
	height: 2px;
	background: var(--filo);
	transform-origin: left center;
}

.is-style-rete::after {
	content: "";
	position: absolute;
	right: calc(var(--capolinea) - var(--r) - 1px);
	top: calc(var(--r) - 1px);
	width: 2px;
	height: calc(var(--riga) + 2.5rem);
	background: var(--lb-mint-500);
	transform-origin: top center;
}

/* Vertical thread, for a section that walks through its steps. */
.is-style-linea-verticale > li {
	position: relative;
	margin: 0;
	padding: 0 0 2rem calc(2 * var(--r) + 1.25rem);
	max-width: 42rem;
	color: var(--testo);
}

.is-style-linea-verticale::before {
	content: "";
	position: absolute;
	left: calc(var(--r) - 1px);
	top: var(--r);
	bottom: 2rem;
	width: 2px;
	background: var(--filo);
	transform-origin: top center;
}

.is-style-linea-verticale > li:last-child {
	padding-bottom: 0;
}

/* On a dark field the hollow nodes take the forest ground. */
:where(.lk-on-dark, .has-primary-background-color, .has-contrast-background-color, .has-luce-gradient-background) :where(.is-style-linea, .is-style-linea-verticale) {
	--nodo-fondo: var(--lb-forest-900);
	--nome: #fff;
	--testo: var(--lb-mint-100);
}

:where(.lk-on-dark, .has-primary-background-color, .has-contrast-background-color, .has-luce-gradient-background) .is-style-linea > li.is-linea > strong {
	color: var(--lb-mint-ink);
}

:where(.lk-on-dark, .has-primary-background-color, .has-contrast-background-color, .has-luce-gradient-background) .is-style-linea > li.is-linea > a {
	background: var(--lb-mint-500);
	color: var(--lb-forest-950);
}

:where(.lk-on-dark, .has-primary-background-color, .has-contrast-background-color, .has-luce-gradient-background) .is-style-linea > li.is-linea > a:hover {
	background: #45ae80;
}

/* One mint action per field: the threads after the first take the outline. */
:where(.lk-on-dark, .has-primary-background-color, .has-contrast-background-color, .has-luce-gradient-background) .is-style-rete > .is-style-linea ~ .is-style-linea > li.is-linea > a {
	background: transparent;
	color: #fff;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

:where(.lk-on-dark, .has-primary-background-color, .has-contrast-background-color, .has-luce-gradient-background) .is-style-rete > .is-style-linea ~ .is-style-linea > li.is-linea > a:hover {
	background: rgba(230, 245, 238, 0.08);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

/* An action under a thread belongs to it. */
.is-style-linea + .wp-block-buttons {
	margin-top: 0 !important;
	padding-left: 0;
}

@media (max-width: 781px) {
	.is-style-linea {
		flex-direction: column;
		gap: 1.5rem;
	}

	.is-style-linea > li:not(.is-linea, :last-child)::after {
		left: calc(var(--r) - 1px);
		right: auto;
		top: calc(2 * var(--r));
		bottom: calc(-1 * var(--gap));
		width: 2px;
		height: auto;
		transform-origin: top center;
	}

	.is-style-linea > li {
		padding: 0 0 0 calc(2 * var(--r) + 1.25rem);
	}

	.is-style-linea > li.is-linea,
	.is-style-linea > li.is-capolinea {
		flex: 0 0 auto;
		padding-right: 0;
	}

	.is-style-rete > .is-style-linea {
		min-height: 0;
	}

	.is-style-rete > .is-style-linea:not(:has(> .is-capolinea)) {
		padding-right: 0;
	}

	.is-style-rete::after,
	.is-style-rete > .is-style-linea:not(:has(> .is-capolinea)) > li:last-child::after {
		content: none;
	}
}

/* The thread draws itself once, then the nodes land in order. */
@media (prefers-reduced-motion: no-preference) {
	.is-style-linea > li::after {
		animation: linkalab-filo-x 0.5s var(--lb-ease) both;
		animation-delay: calc(0.3s + var(--n, 0) * 0.12s);
	}

	.is-style-rete::after {
		animation: linkalab-filo-y 0.6s 0.9s var(--lb-ease) both;
	}

	:where(.is-style-linea, .is-style-linea-verticale) > li:not(.is-linea)::before {
		animation: linkalab-nodo 0.52s var(--lb-ease) both;
		animation-delay: calc(0.25s + var(--n, 0) * 0.12s);
	}

	@media (max-width: 781px) {
		.is-style-linea > li::after {
			animation-name: linkalab-filo-y;
		}
	}
}

.is-style-linea > li:nth-child(2) { --n: 1; }
.is-style-linea > li:nth-child(3) { --n: 2; }
.is-style-linea > li:nth-child(4) { --n: 3; }
.is-style-linea > li:nth-child(5) { --n: 4; }
.is-style-linea > li:nth-child(6) { --n: 5; }

@keyframes linkalab-filo-x {
	from { transform: scaleX(0); }
}

@keyframes linkalab-filo-y {
	from { transform: scaleY(0); }
}

@keyframes linkalab-nodo {
	from { transform: scale(0.3); opacity: 0; }
}

/*
 * "Sezione": what lies underneath. The agents (paragraph "linkalab-sezione-cima")
 * sit on a ground line, the controls are full strata that lighten toward the
 * systems already in place (paragraph "linkalab-sezione-base"), drawn as a
 * hatched bed under the last stratum.
 */
.is-style-sezione {
	list-style: none;
	margin: 0 !important;
	padding: 0;
	display: grid;
	gap: 3px;
}

.linkalab-sezione-cima {
	display: inline-block;
	margin-bottom: 0.75rem !important;
	padding: 0.35rem 0.9rem 0.35rem 1.75rem;
	border: 2px solid var(--lb-forest-900);
	border-radius: 999px;
	background: radial-gradient(circle at 0.85rem 50%, var(--lb-mint-500) 0.375rem, transparent 0.4rem) no-repeat;
	font-family: var(--lb-display);
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--lb-forest-950);
}

.is-style-sezione > li {
	display: grid;
	grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
	gap: 0.25rem 1.5rem;
	align-items: baseline;
	margin: 0;
	padding: 1rem 1.25rem;
	border-radius: 6px;
	background: color-mix(in oklab, var(--lb-forest-950), var(--lb-forest-700) calc(var(--i, 0) * 20%));
	color: var(--lb-mint-100);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.is-style-sezione > li:first-child {
	box-shadow: 0 -0.75rem 0 -0.625rem var(--lb-mint-500);
}

.is-style-sezione > li:nth-child(2) { --i: 1; }
.is-style-sezione > li:nth-child(3) { --i: 2; }
.is-style-sezione > li:nth-child(4) { --i: 3; }
.is-style-sezione > li:nth-child(5) { --i: 4; }
.is-style-sezione > li:nth-child(n + 6) { --i: 5; }

.is-style-sezione > li > strong {
	font-family: var(--lb-display);
	font-size: 1.0625rem;
	font-weight: 600;
	letter-spacing: -0.005em;
	color: #fff;
}

.is-style-sezione > li > strong a {
	color: inherit;
	text-decoration: none;
}

.is-style-sezione > li > strong a:hover {
	text-decoration: underline;
	text-decoration-color: var(--lb-mint-500);
	text-decoration-thickness: 2px;
}

.linkalab-sezione-base {
	margin-top: 3px !important;
	padding: 0.85rem 1.25rem;
	border: 1px solid var(--lb-neutral-200);
	border-radius: 6px;
	background: repeating-linear-gradient(135deg, #eef2f0 0 7px, var(--lb-neutral-50) 7px 14px);
	font-family: var(--lb-display);
	font-weight: 600;
	font-size: 0.9375rem;
	color: #3d4b45;
}

/* The proof of each stratum, in mono, under its name. */
.is-style-sezione > li > em {
	grid-column: 1;
	font-family: var(--lb-mono);
	font-style: normal;
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: var(--lb-mint-ink);
}

@media (max-width: 900px) {
	.is-style-sezione > li {
		grid-template-columns: minmax(0, 1fr);
	}

	.is-style-sezione > li > em {
		grid-row: auto;
	}
}

/* Sector index: ruled rows in columns (no nodes: a list is not a path). */
.is-style-indice {
	list-style: none;
	margin: 0;
	padding: 0;
	columns: 2 16rem;
	column-gap: 2.5rem;
}

.is-style-indice > li {
	break-inside: avoid;
	display: flex;
	align-items: center;
	gap: 0.875rem;
	margin: 0;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--lb-neutral-200);
	font-family: var(--lb-display);
	font-weight: 600;
	font-size: 1.0625rem;
}

.is-style-indice a {
	color: var(--lb-forest-950);
	text-decoration: none;
}

.is-style-indice a:hover {
	color: var(--lb-forest-700);
}

/* List of posts as rows, newest first and largest. */
.wp-block-post-template.is-style-elenco {
	list-style: none;
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--lb-neutral-200);
}

.wp-block-post-template.is-style-elenco > li {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 0.25rem 2rem;
	margin: 0;
	padding: 1.25rem 0;
	border-top: 1px solid var(--lb-neutral-200);
}

.wp-block-post-template.is-style-elenco > li > * {
	margin: 0;
}

.wp-block-post-template.is-style-elenco .wp-block-post-title {
	grid-column: 1;
	font-family: var(--lb-display);
	font-weight: 600;
	font-size: 1.25rem;
	letter-spacing: -0.01em;
	line-height: 1.25;
}

.wp-block-post-template.is-style-elenco > li:first-child .wp-block-post-title {
	font-size: clamp(1.5rem, 2.6vw, 2.125rem);
	font-weight: 700;
	letter-spacing: -0.02em;
}

.wp-block-post-template.is-style-elenco :where(.wp-block-post-terms, .wp-block-post-date) {
	grid-column: 2;
	grid-row: 1;
	text-align: right;
	white-space: nowrap;
	font-family: var(--lb-mono);
	font-size: 0.8125rem;
	font-weight: 400;
	letter-spacing: 0.02em;
	color: var(--lb-neutral-600);
}

.wp-block-post-template.is-style-elenco .wp-block-post-terms a {
	color: var(--lb-forest-700);
	text-decoration: none;
}

.wp-block-post-template.is-style-elenco .wp-block-post-date {
	text-transform: lowercase;
}

.wp-block-post-template.is-style-elenco .wp-block-post-terms + .wp-block-post-date {
	grid-row: 2;
}

@media (max-width: 600px) {
	.wp-block-post-template.is-style-elenco > li {
		grid-template-columns: minmax(0, 1fr);
	}

	.wp-block-post-template.is-style-elenco :where(.wp-block-post-terms, .wp-block-post-date) {
		grid-column: 1;
		grid-row: auto;
		text-align: left;
		white-space: normal;
	}
}

/* Client or partner logos on a grid of five, in one optical box each. */
.linkalab-loghi {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 1.5rem 1.25rem;
	align-items: center;
}

.linkalab-loghi > .wp-block-image {
	margin: 0;
}

.linkalab-loghi img {
	display: block;
	width: 100%;
	height: 2.75rem;
	object-fit: contain;
	filter: grayscale(1);
	mix-blend-mode: multiply;
	transition: filter 0.3s;
}

/* Logos drawn in light grey (class "is-pallido") are pulled to ink. */
.linkalab-loghi .is-pallido img {
	filter: grayscale(1) url(#linkalab-inchiostro);
}

.linkalab-loghi img:hover {
	filter: none;
}

@media (max-width: 781px) {
	.linkalab-loghi {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
	}

	.linkalab-loghi > .wp-block-image {
		flex: 0 0 calc((100% - 1.25rem) / 2);
	}

	/* An odd count goes three by row, so the last row is never a lone logo. */
	.linkalab-loghi:has(> :last-child:nth-child(odd)) > .wp-block-image {
		flex-basis: calc((100% - 2 * 1.25rem) / 3);
	}
}

/* A full forest field: light text, light rules on the index. */
.linkalab-campo {
	color: var(--lb-mint-100);
}

.linkalab-campo :where(h1, h2, h3, h4) {
	color: #fff;
}

.linkalab-campo .is-style-indice > li {
	border-bottom-color: rgba(230, 245, 238, 0.16);
}

.linkalab-campo .is-style-indice a {
	color: #fff;
}

.linkalab-campo .is-style-indice a:hover {
	color: var(--lb-mint-ink);
}

/* A row of faces: portraits with the name under each. */
.linkalab-volti {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 1.25rem;
	margin-bottom: var(--wp--preset--spacing--60, 3rem);
}

.linkalab-volti > .wp-block-image {
	margin: 0;
}

.linkalab-volti img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 14px;
}

.linkalab-volti figcaption {
	margin-top: 0.5rem;
	font-family: var(--lb-display);
	font-weight: 600;
	font-size: 0.9375rem;
	text-align: left;
	color: var(--lb-forest-950);
}

@media (max-width: 781px) {
	.linkalab-volti {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/*
 * "Fermata" on columns: each row is a numbered step on a vertical thread,
 * and consecutive rows join into one thread.
 */
/* Each run of consecutive stops counts from 1. */
.wp-block-columns.is-style-fermata:not(.is-style-fermata + .is-style-fermata) {
	counter-reset: fermata;
}

.wp-block-columns.is-style-fermata {
	--filo: var(--lb-mint-500);
	--r: 1.375rem;
	position: relative;
	counter-increment: fermata;
	margin-bottom: 0;
	padding: 0 0 clamp(2rem, 4vw, 3rem) calc(2 * var(--r) + 1.5rem);
}

.wp-block-columns.is-style-fermata::before {
	content: counter(fermata, decimal-leading-zero);
	position: absolute;
	z-index: 1;
	top: 0;
	left: 0;
	box-sizing: border-box;
	width: calc(2 * var(--r));
	height: calc(2 * var(--r));
	display: grid;
	place-items: center;
	border: 2px solid var(--filo);
	border-radius: 50%;
	background: #fff;
	color: var(--lb-forest-900);
	font-family: var(--lb-mono);
	font-weight: 500;
	font-size: 0.8125rem;
	line-height: 1;
}

.wp-block-columns.is-style-fermata::after {
	content: "";
	position: absolute;
	left: calc(var(--r) - 1px);
	top: var(--r);
	bottom: 0;
	width: 2px;
	background: var(--filo);
}

.wp-block-columns.is-style-fermata:not(:has(+ .is-style-fermata))::after {
	bottom: auto;
	height: 0;
}

.wp-block-columns.is-style-fermata + .wp-block-columns.is-style-fermata {
	margin-top: 0;
}

.wp-block-columns.is-style-fermata :where(h2, h3, h4):first-child {
	margin-top: 0.35rem;
}

/*
 * The thread on an inner page: the current stop, when the page is one, is
 * the lit node and the contact stop goes hollow, so one node is lit.
 */
.linkalab-percorso .is-style-linea {
	--capolinea: 8rem;
}

/* On inner pages Contatti is a stop like the others: only "sei qui" is lit. */
.linkalab-percorso .is-style-linea > li.is-capolinea::before {
	border: 3px solid var(--filo);
	background: var(--nodo-fondo);
	box-shadow: none;
}

.linkalab-percorso .is-style-linea > li.is-qui::before {
	border: 0;
	background: var(--filo);
	box-shadow: 0 0 0 7px rgba(93, 190, 142, 0.22);
}

.linkalab-percorso .is-style-linea > li.is-qui > strong {
	color: var(--lb-forest-700);
}

.linkalab-percorso > h2,
.linkalab-casi-settore > h2 {
	margin-bottom: var(--wp--preset--spacing--50, 2rem);
}

.linkalab-casi-settore .wp-block-post-title a {
	color: var(--lb-forest-950);
	text-decoration: none;
}

.linkalab-casi-settore .wp-block-post-title a:hover {
	color: var(--lb-forest-700);
	text-decoration: underline;
}

/* Lists of posts in rows (image beside text): newest row first and larger. */
.wp-block-post-template > li:first-child .is-style-card .wp-block-post-title {
	/* Wins over the post title's font-size preset class. */
	font-size: clamp(1.5rem, 2.6vw, 2rem) !important;
}

@media (max-width: 600px) {
	.wp-block-post-template .is-style-card > .wp-block-post-featured-image,
	.wp-block-post-template .is-style-card > .wp-block-post-featured-image img {
		width: 100% !important;
	}
}

/* "Punto": a reason or a feature under a short mint rule, not a box. */
.linkalab-punto {
	padding-top: 1rem;
	border-top: 2px solid var(--lb-mint-500);
}

/* Excerpts in lists of posts keep a reading measure (about 75 characters). */
.wp-block-post-excerpt {
	max-width: 33rem;
}

/*
 * "is-arrivo": on small screens, where the threads run apart, a thread that
 * would end without its destination reaches a hollow Contatti node; the one
 * lit node stays at the end of the last thread.
 */

@media (min-width: 782px) {
	.is-style-linea > li.is-arrivo {
		display: none;
	}

	.is-style-rete > .is-style-linea:not(:has(> .is-capolinea)) > li:nth-last-child(1 of :not(.is-arrivo))::after {
		content: "";
		position: absolute;
		left: calc(2 * var(--r));
		right: calc(-1 * var(--r) - 1px);
		top: calc(var(--r) - 1px);
		height: 2px;
		background: var(--filo);
		transform-origin: left center;
	}
}

/* Proof under a claim: the cases that run on it, as ruled rows. */
.linkalab-prove-titolo {
	margin-top: var(--wp--preset--spacing--50) !important;
}

.linkalab-prove {
	columns: 1;
}

/* A person's role under the name, in the team grid. */
.linkalab-ruolo {
	margin-top: 0.15rem !important;
	font-family: var(--lb-mono);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: var(--lb-forest-700);
}

/* The next step after an article. */
.linkalab-passo > h2 {
	margin: 0.25rem 0 0.75rem;
	font-size: var(--wp--preset--font-size--x-large) !important;
}

.linkalab-passo__label {
	margin: 0;
	font-family: var(--lb-mono);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--lb-forest-700);
}

.linkalab-passo .wp-block-buttons {
	margin-top: 1.25rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

/*
 * Reading flow of the long pages ("linkalab-lettura"), and the stops of a
 * service page: the titles in a column of their own, the text beside them at
 * reading measure, so the page uses its width without widening the lines.
 */
.linkalab-lettura {
	margin-block-start: var(--wp--preset--spacing--70, 4rem);
}

.linkalab-lettura > h2 {
	font-size: var(--wp--preset--font-size--x-large);
}

.linkalab-lettura > h3:not(:first-child) {
	font-size: 1.25rem;
}

/* A grid of sectors: one card each, the picture on top, the name as the link. */
.linkalab-settori-griglia > .is-style-card {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 0;
}

.linkalab-settori-griglia > .is-style-card > * {
	margin: 0;
}

/* Wins over the square ratio the image blocks carry inline. */
.linkalab-settori-griglia .wp-block-image img {
	width: 100%;
	aspect-ratio: 3 / 2 !important;
	object-fit: cover;
}

.linkalab-settori-griglia h3 a {
	color: var(--lb-forest-950);
	text-decoration: none;
}

/* The whole card answers the link of its title. */
.linkalab-settori-griglia h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.linkalab-settori-griglia > .is-style-card:hover h3 a {
	color: var(--lb-forest-700);
}

/* The head of an area in a catalogue: its icon small, beside the title. */
.wp-block-columns.linkalab-tec-testa {
	flex-direction: row-reverse;
	flex-wrap: nowrap !important;
	justify-content: flex-end;
	align-items: center;
	gap: 1rem;
	margin-block: var(--wp--preset--spacing--70, 4rem) 1rem;
}

main .wp-block-columns.linkalab-tec-testa > .wp-block-column {
	flex: 0 0 auto !important;
}

main .wp-block-columns.linkalab-tec-testa > .wp-block-column:first-child {
	flex: 1 1 auto !important;
}

.linkalab-tec-testa .wp-block-image,
.linkalab-tec-testa :where(h2, h3) {
	margin: 0;
}

.linkalab-tec-testa img {
	display: block;
	width: 3rem;
	height: 3rem;
	object-fit: contain;
}

.linkalab-tec-testa :where(h2, h3) {
	font-size: var(--wp--preset--font-size--x-large) !important;
}

/* An entry of a catalogue (a course, a technology): a ruled row, its name beside its description. */
.wp-block-columns.linkalab-voce {
	margin-block: 0;
	padding-block: 1rem;
	border-top: 1px solid var(--lb-neutral-200);
}

.wp-block-columns.linkalab-voce:not(:has(+ .linkalab-voce)) {
	border-bottom: 1px solid var(--lb-neutral-200);
}

.linkalab-voce :is(h3, h4) {
	margin: 0;
	font-family: var(--lb-display);
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--lb-forest-950);
}

.linkalab-voce p {
	margin: 0;
}

@media (min-width: 900px) {
	.wp-block-columns.linkalab-voce {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 38rem);
		column-gap: var(--wp--preset--spacing--60, 3rem);
	}
}

/* A section title alone in its column, beside its text: the size of the reading flow's titles. */
.page-template-page-settore .wp-block-columns > .wp-block-column:first-child > h2:only-child {
	font-size: var(--wp--preset--font-size--x-large) !important;
}

/* A long page title (a title with its subtitle) one step smaller. */
h1.is-lungo {
	font-size: var(--wp--preset--font-size--xx-large) !important;
}

/* Four cards in one row, never three and an orphan. */
@media (min-width: 1100px) {
	.page-template-page-settore .is-layout-grid:has(> :nth-child(4):last-child) {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 900px) {
	.linkalab-lettura,
	.page-template-page-settore .wp-block-columns.is-style-fermata > .wp-block-column:only-child {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 38rem);
		column-gap: var(--wp--preset--spacing--60, 3rem);
		align-items: start;
	}

	.linkalab-lettura > *,
	.page-template-page-settore .wp-block-columns.is-style-fermata > .wp-block-column:only-child > * {
		grid-column: 2;
		max-width: none;
	}

	.linkalab-lettura > :where(h2, h3),
	.page-template-page-settore .wp-block-columns.is-style-fermata > .wp-block-column:only-child > :first-child {
		grid-column: 1;
	}

	/* The text starts on the line of its title. */
	.linkalab-lettura > h2:not(:first-child) + * {
		margin-block-start: var(--wp--preset--spacing--70);
	}

	.linkalab-lettura > h3 + * {
		margin-block-start: var(--wp--preset--spacing--50);
	}

	.linkalab-lettura > :first-child + *,
	.page-template-page-settore .wp-block-columns.is-style-fermata > .wp-block-column:only-child > :first-child + * {
		margin-block-start: 0.35rem;
	}

	.linkalab-lettura > h2:first-child {
		margin-block-start: 0.35rem;
	}

	/* The action after the text sits under the text. */
	.linkalab-lettura + .wp-block-group:has(> .wp-block-buttons:only-child) {
		padding-inline-start: calc(100% - 38rem);
	}
}
