/**
 * NotyLab workflows catalogue — /workflows/.
 *
 * Loaded after unica-core-home.css and unica-core-tools.css, and scoped to
 * `.uc-workflows`, which sits on the same element as `.uc-home` and
 * `.uc-tools`. The page is the tools catalogue with workflows in it: the
 * search field, the pinned group navigation, the featured row and the grouped
 * rows are all that stylesheet's. This one adds only what a workflow has and a
 * tool does not:
 *
 *   1. a method sheet for the hero — one workflow's own steps,
 *   2. a number in front of each row, in place of a tool's icon,
 *   3. a line of facts (tool, number of steps) under a row or a card,
 *   4. the featured card's picture, when it is a plot.
 *
 * No new colours, radii or shadows: every value below is a token or a mix of
 * tokens. Layout uses logical properties, so right-to-left needs only the few
 * overrides at the end.
 */

/* ── 1. The method sheet ──────────────────────────────────────────── */
.nl-proto {
	display: none;
}

.nl-proto__page {
	padding: clamp(1.25rem, 2vw, 1.75rem) clamp(1.25rem, 2.2vw, 1.9rem) clamp(1.1rem, 1.8vw, 1.5rem);
	border-radius: 3px;
	background: #f2f6f7;
}

.nl-proto__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	font-family: var(--nl-f-mono);
	font-size: 0.8125rem;
	letter-spacing: 0.02em;
	color: var(--nl-plate-dim);
}

.nl-proto__tool {
	color: var(--nl-plate-brand);
}

.uc-workflows .nl-proto__title {
	margin-block: 0.7rem 1.15rem;
	color: var(--nl-plate-fg);
	font-size: clamp(1.5rem, 2.2vw, 1.9rem);
	line-height: 1.15;
}

/* The steps hang from one vertical rule, each marked by a tick — the page's
   ruler turned on its side. The last tick is the result. */
.nl-proto__steps {
	counter-reset: nl-proto;
	border-inline-start: 1px solid rgb(11 38 53 / 0.2);
}

.nl-proto__steps li {
	position: relative;
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	padding: 0.5rem 0 0.5rem 1.25rem;
	padding-inline: 1.25rem 0;
	color: var(--nl-plate-fg);
	font-size: 0.9375rem;
	line-height: 1.4;
	counter-increment: nl-proto;
}

.nl-proto__steps li + li {
	border-top: 1px solid rgb(11 38 53 / 0.07);
}

.nl-proto__steps li::before {
	content: counter(nl-proto, decimal-leading-zero);
	flex: none;
	color: var(--nl-plate-brand);
	font-family: var(--nl-f-mono);
	font-size: 0.8125rem;
}

.nl-proto__steps li::after {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 1.05rem;
	width: 0.55rem;
	border-top: 1px solid rgb(11 38 53 / 0.45);
}

.nl-proto__steps li:last-child::after {
	width: 0.8rem;
	border-top: 2px solid var(--nl-mark);
}

@media (min-width: 1024px) {
	.nl-proto {
		display: block;
		width: 100%;
		max-width: 27rem;
		margin-inline-start: auto;
	}
}

/* ── 2. Numbered rows ─────────────────────────────────────────────── */
.nl-wf-list {
	counter-reset: nl-wf;
}

/* A hidden row is not rendered and so does not count: the sequence closes up
   around whatever a search leaves on the page. */
.nl-wf-row {
	counter-increment: nl-wf;
}

.uc-workflows .nl-wf-row .nl-tool-row__link {
	align-items: start;
	gap: 1.25rem;
	padding-block: 1.25rem;
}

.nl-wf-num {
	flex: none;
	min-width: 2.4rem;
	padding-top: 0.05rem;
	color: color-mix(in srgb, var(--nl-brand) 62%, transparent);
	font-family: var(--nl-f-display);
	font-size: 1.75rem;
	font-variant-numeric: tabular-nums lining-nums;
	line-height: 1;
	letter-spacing: -0.02em;
	transition: color 0.2s;
}

.nl-wf-num::before {
	content: counter(nl-wf, decimal-leading-zero);
}

.nl-tool-row__link:hover .nl-wf-num,
.nl-tool-row__link:focus-visible .nl-wf-num {
	color: var(--nl-brand);
}

.uc-workflows .nl-wf-row__title {
	font-size: 1.125rem;
	text-wrap: balance;
}

.uc-workflows .nl-wf-row .nl-tool-row__go {
	align-self: center;
}

/* ── 3. Facts: the tool it opens in, the number of steps ──────────── */
.nl-wf-facts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.2rem 0.6rem;
}

.nl-wf-row .nl-wf-facts {
	margin-top: 0.35rem;
}

.nl-wf-facts > span + span::before {
	content: "";
	display: inline-block;
	width: 0.75rem;
	margin-inline-end: 0.6rem;
	border-top: 1px solid color-mix(in srgb, var(--nl-fg) 35%, transparent);
	vertical-align: middle;
}

.nl-wf-facts > span:first-child {
	color: var(--nl-fg);
}

/* ── 4. Featured ──────────────────────────────────────────────────── */
/* A chart is a print, not a photograph: pinned by its top-left corner and
   running off the card's edge, as on the front page. */
.nl-wf-card--chart .nl-card__plate {
	padding: 1.25rem 0 0 1.25rem;
}

.nl-wf-card--chart .nl-card__plate > img {
	position: static;
	border-top-left-radius: var(--nl-r-plate);
	object-position: left top;
	box-shadow: 0 0 0 1px rgb(11 38 53 / 0.1), -8px 12px 30px -18px rgb(11 38 53 / 0.5);
	transform-origin: left top;
}

/* ── Right-to-left ────────────────────────────────────────────────── */
/* The monospace stack has no Persian letters worth showing, and the display
   face is the theme's own there; numbers follow the page's digits. */
[dir="rtl"] .uc-workflows :is(.nl-wf-facts, .nl-proto__meta) {
	font-family: var(--nl-f-sans);
	letter-spacing: 0;
}

[dir="rtl"] .nl-proto__steps li::before {
	content: counter(nl-proto, persian);
	font-family: var(--nl-f-sans);
	font-size: 0.875rem;
	font-weight: 600;
}

[dir="rtl"] .nl-wf-num {
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: 0;
}

[dir="rtl"] .nl-wf-num::before {
	content: counter(nl-wf, persian);
}

[dir="rtl"] .uc-workflows .nl-proto__title {
	font-size: clamp(1.3rem, 1.9vw, 1.6rem);
	line-height: 1.4;
}

[dir="rtl"] .uc-workflows .nl-wf-row__title {
	letter-spacing: 0;
}

/* Tool names stay left-to-right: they are product names. */
[dir="rtl"] .nl-proto__tool {
	direction: ltr;
}

/* ── Phone ────────────────────────────────────────────────────────── */
@media (max-width: 639.98px) {
	.uc-workflows .nl-wf-row .nl-tool-row__link {
		gap: 0.85rem;
		padding-block: 1.1rem;
	}

	.nl-wf-num {
		min-width: 1.9rem;
		font-size: 1.375rem;
	}

	[dir="rtl"] .nl-wf-num {
		font-size: 1.25rem;
	}

	.uc-workflows .nl-wf-row__title {
		font-size: 1.0625rem;
	}
}
