/* WOREVA SUP 335 · /sup/manual · mobile-first (360 / 768 / 1100) */
@font-face {
	font-family: Barlow;
	font-weight: 400;
	font-display: swap;
	src: url(fonts/barlow-latin-400-normal.woff2) format('woff2');
}
@font-face {
	font-family: Barlow;
	font-weight: 700;
	font-display: swap;
	src: url(fonts/barlow-latin-700-normal.woff2) format('woff2');
}
@font-face {
	font-family: 'Barlow Semi Condensed';
	font-weight: 700;
	font-display: swap;
	src: url(fonts/barlow-semi-condensed-latin-700-normal.woff2) format('woff2');
}

:root {
	--bg: #fff;
	--surface: #f8f2fc;
	--ink: #15111f;
	--muted: #564e66;
	--line: #e2d2f0;
	--lilac: #7417b3;
	--brand: #8f1ed6;
	--accent-ink: #fff;
	--danger: #c4161c;
	--danger-bg: #fcedee;
	--warning: #b04700;
	--warning-bg: #fff1e6;
	--caution: #f4c300;
	--caution-border: #d9ae00;
	--caution-bg: #fff9db;
	--mandatory: #0b57a4;
	--mandatory-bg: #eaf1fa;
	--note: #7a18b8;
	--note-bg: #f8f2fc;
	--ok: #167a3a;
	--wa: #0b7a3b;
	--radius: 10px;
	--topbar: 60px;
	--font: Barlow, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
	--font-head: 'Barlow Semi Condensed', Barlow, system-ui, sans-serif;
	color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #120e1c;
		--surface: #1e1830;
		--ink: #f1ecf8;
		--muted: #c2b8d2;
		--line: #3a3050;
		--lilac: #d9a6ff;
		--brand: #b866f0;
		--accent-ink: #120e1c;
		--danger-bg: #3a1416;
		--warning-bg: #3a2312;
		--caution-bg: #352d0b;
		--mandatory-bg: #0f2742;
		--note-bg: #2a1838;
		--ok: #4cc27a;
	}
	.callout .co-body,
	.problem,
	.emergency {
		color: var(--ink);
	}
	.picto,
	.kit__ph img,
	.parts__img img {
		background: #fff;
		border-radius: 6px;
	}
}

* {
	box-sizing: border-box;
}
html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--topbar) + 12px);
	-webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
html[data-switching] body {
	visibility: hidden;
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 400 17px/1.55 var(--font);
}
img {
	max-width: 100%;
	height: auto;
}
a {
	color: var(--lilac);
	text-underline-offset: 2px;
}
:focus-visible {
	outline: 3px solid var(--mandatory);
	outline-offset: 2px;
}
@media (prefers-color-scheme: dark) {
	:focus-visible {
		outline-color: #7db7ff;
	}
}
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.skip {
	position: absolute;
	left: -999px;
	top: 8px;
	z-index: 50;
	background: var(--ink);
	color: var(--bg);
	padding: 10px 14px;
	border-radius: 8px;
}
.skip:focus {
	left: 8px;
}
h1,
h2,
h3,
h4 {
	font-family: var(--font-head);
	line-height: 1.15;
	font-weight: 700;
}
p,
ul,
ol {
	margin: 0 0 0.8em;
}

/* Barra superior */
.topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: var(--topbar);
	padding: 8px 16px;
	background: var(--bg);
	border-bottom: 1px solid var(--line);
}
.topbar__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	flex: 1;
	color: var(--ink);
	text-decoration: none;
}
.topbar__brand img {
	width: 104px;
	height: auto;
	display: block;
	flex: 0 0 auto;
}
.topbar__title {
	display: none;
	font-size: 15px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.topbar .topbar__toc {
	display: none;
}
.topbar__pdf span {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.lang-select select {
	font: 700 16px var(--font);
	color: var(--ink);
	background: var(--bg);
	border: 2px solid var(--line);
	border-radius: 8px;
	padding: 6px 8px;
	min-height: 44px;
	max-width: 150px;
}
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 12px;
	border-radius: 8px;
	border: 2px solid var(--ink);
	background: var(--bg);
	color: var(--ink);
	font: 700 16px var(--font);
	text-decoration: none;
	cursor: pointer;
}
.btn--primary {
	background: var(--brand);
	border-color: var(--brand);
	color: #fff;
}
.btn--primary .ico {
	filter: brightness(0) invert(1);
}
.btn--ghost {
	border-color: var(--line);
}
@media (min-width: 768px) {
	.topbar__title {
		display: inline;
	}
	.topbar__pdf span {
		position: static;
		width: auto;
		height: auto;
		clip: auto;
	}
}

/* Disposició */
.layout {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 16px;
}
main {
	min-width: 0;
	padding-bottom: 96px;
}
main:focus {
	outline: none;
}
@media (min-width: 1100px) {
	.layout {
		display: grid;
		grid-template-columns: 270px minmax(0, 1fr);
		gap: 40px;
	}
	main {
		padding-bottom: 40px;
	}
}

/* Índex: lateral fix (escriptori) · full inferior (mòbil) */
.toc__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.toc__title {
	margin: 0;
	font: 700 14px var(--font);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--muted);
}
.toc__list {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
}
.toc__list a {
	display: flex;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 8px;
	color: var(--ink);
	text-decoration: none;
	line-height: 1.25;
	font-size: 16px;
}
.toc__list a:hover {
	background: var(--surface);
}
.toc__list a[aria-current] {
	background: var(--surface);
	color: var(--lilac);
	font-weight: 700;
	box-shadow: inset 3px 0 0 var(--brand);
}
.toc__n {
	flex: 0 0 1.6em;
	font-weight: 700;
	color: var(--lilac);
}
.toc__close {
	display: none;
	font-size: 28px;
	line-height: 1;
	background: none;
	border: 0;
	color: var(--ink);
	min-width: 44px;
	min-height: 44px;
	cursor: pointer;
}
@media (max-width: 1099.98px) {
	.toc {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 40;
		max-height: 78vh;
		overflow: auto;
		background: var(--bg);
		border-top: 2px solid var(--brand);
		border-radius: 16px 16px 0 0;
		padding: 12px 16px 24px;
		box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
		transform: translateY(110%);
		visibility: hidden;
	}
	.toc[data-open] {
		transform: none;
		visibility: visible;
	}
	.toc__close {
		display: block;
	}
	.topbar .topbar__toc {
		display: inline-flex;
	}
	html.no-js .toc {
		position: static;
		transform: none;
		visibility: visible;
		box-shadow: none;
		border: 1px solid var(--line);
		border-radius: var(--radius);
		margin: 16px 0;
	}
}
@media (min-width: 1100px) {
	.toc {
		position: sticky;
		top: calc(var(--topbar) + 16px);
		align-self: start;
		max-height: calc(100vh - var(--topbar) - 32px);
		overflow: auto;
		padding: 16px 0;
	}
}

/* Capçalera del document */
.hero {
	padding: 28px 0 8px;
}
.eyebrow {
	margin: 0 0 4px;
	font: 700 14px var(--font);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--lilac);
}
.hero h1 {
	font-size: 34px;
	margin: 0 0 6px;
}
.hero__variants {
	color: var(--muted);
	margin-bottom: 18px;
}
@media (min-width: 768px) {
	.hero h1 {
		font-size: 44px;
	}
}

/* Seccions */
.chapter {
	padding-top: 28px;
	margin-top: 20px;
	border-top: 1px solid var(--line);
}
.sec-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
}
.sec-num {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 8px;
	border-radius: 10px;
	background: var(--brand);
	color: #fff;
	font: 700 22px var(--font-head);
}
.chapter h2 {
	margin: 0;
	font-size: 28px;
}
.chapter h3 {
	font-size: 23px;
	margin: 28px 0 10px;
}
.chapter h4 {
	font-size: 19px;
	margin: 20px 0 8px;
}
.lead {
	font-size: 18px;
}
.aux {
	font-size: 15px;
	color: var(--muted);
}
@media (min-width: 768px) {
	.chapter h2 {
		font-size: 34px;
	}
}
main ul,
main ol {
	padding-left: 1.3em;
}
main li {
	margin: 0.25em 0;
}
.checklist {
	list-style: none;
	padding-left: 0;
}
.checklist li {
	position: relative;
	padding-left: 30px;
}
.checklist li::before {
	content: '';
	position: absolute;
	left: 2px;
	top: 0.3em;
	width: 18px;
	height: 18px;
	border: 2px solid var(--brand);
	border-radius: 4px;
}

/* Avisos (PELIGRO / ADVERTENCIA / PRECAUCIÓN / OBLIGATORIO / NOTA) */
.callout {
	margin: 18px 0;
	border: 2px solid;
	border-radius: var(--radius);
	overflow: hidden;
	break-inside: avoid;
}
.co-head {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px 8px;
	margin: 0;
	padding: 8px 14px;
	color: #fff;
	font: 700 17px var(--font);
}
.co-sig {
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.co-body {
	padding: 12px 14px;
}
.co-body > .co-text > :last-child,
.co-text > :last-child {
	margin-bottom: 0;
}
.co-body--pics {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 12px;
	align-items: start;
}
.co-pics {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.co-pics .picto {
	width: 56px;
	height: 56px;
}
.callout--danger {
	border-color: var(--danger);
}
.callout--danger .co-head {
	background: var(--danger);
}
.callout--danger .co-body {
	background: var(--danger-bg);
}
.callout--warning {
	border-color: var(--warning);
}
.callout--warning .co-head {
	background: var(--warning);
}
.callout--warning .co-body {
	background: var(--warning-bg);
}
.callout--caution {
	border-color: var(--caution-border);
}
.callout--caution .co-head {
	background: var(--caution);
	color: #15111f;
}
.callout--caution .co-body {
	background: var(--caution-bg);
}
.callout--caution .co-head .ico {
	filter: none;
}
.callout--mandatory {
	border-color: var(--mandatory);
}
.callout--mandatory .co-head {
	background: var(--mandatory);
}
.callout--mandatory .co-body {
	background: var(--mandatory-bg);
}
.callout--note {
	border-color: #af4dd1;
}
.callout--note .co-head {
	background: var(--note);
}
.callout--note .co-body {
	background: var(--note-bg);
}
.legend {
	list-style: none;
	padding: 0;
	display: grid;
	gap: 8px;
}
.legend li {
	display: grid;
	grid-template-columns: 150px 1fr;
	gap: 10px;
	align-items: center;
}
.chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: 6px;
	color: #fff;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 14px;
	letter-spacing: 0.04em;
}
.chip--danger {
	background: var(--danger);
}
.chip--warning {
	background: var(--warning);
}
.chip--caution {
	background: var(--caution);
	color: #15111f;
}
.chip--mandatory {
	background: var(--mandatory);
}
.chip--note {
	background: var(--note);
}
.emergency {
	display: flex;
	gap: 16px;
	align-items: center;
	margin: 18px 0;
	padding: 14px 16px;
	border: 2px solid var(--danger);
	border-radius: var(--radius);
	background: var(--danger-bg);
}
.emergency__num {
	font: 700 48px/1 var(--font-head);
	color: var(--danger);
	text-decoration: none;
}
.emergency__t {
	margin: 0;
	font-weight: 700;
	text-transform: uppercase;
}
.emergency p:last-child {
	margin: 0;
}
@media (prefers-color-scheme: dark) {
	.emergency__num {
		color: #ff8a8f;
	}
}

/* Pictogrames */
.picto-grid {
	list-style: none;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 12px;
}
.picto-grid figure {
	margin: 0;
	text-align: center;
	font-size: 15px;
	line-height: 1.3;
}
.picto-grid .picto {
	width: 72px;
	height: 72px;
	display: block;
	margin: 0 auto 6px;
}
.picto-group {
	margin: 16px 0;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.picto-group__t {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px;
	font-size: 18px;
	text-transform: uppercase;
}
.picto-group__t .picto {
	width: 28px;
	height: 28px;
}
.limits {
	list-style: none;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}
.limits li {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.limits b {
	font: 700 22px var(--font-head);
}
.limits span {
	color: var(--muted);
	font-size: 15px;
}
@media (min-width: 768px) {
	.limits {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Taules d'especificacions */
.specs {
	width: 100%;
	border-collapse: collapse;
	margin: 8px 0 16px;
	font-size: 16px;
}
.specs th,
.specs td {
	text-align: left;
	vertical-align: top;
	padding: 9px 10px;
	border-bottom: 1px solid var(--line);
}
.specs th {
	width: 38%;
	font-weight: 700;
}
.specs tr.key th,
.specs tr.key td {
	background: var(--surface);
	font-weight: 700;
}
.incl {
	display: block;
	font-weight: 400;
	font-size: 14px;
	color: var(--muted);
}

/* Kit */
.kit {
	list-style: none;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 12px;
}
.kit__item {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.kit__item--wide {
	grid-column: 1/-1;
}
.kit__ph {
	display: grid;
	place-items: center;
	height: 140px;
	padding: 10px;
	background: var(--surface);
}
.kit__ph img {
	max-height: 120px;
	width: auto;
	object-fit: contain;
}
.kit__item--wide .kit__ph {
	height: auto;
}
.kit__item--wide .kit__ph img {
	max-height: none;
	width: 100%;
	max-width: 560px;
}
.kit__cap {
	padding: 10px 12px;
	font-size: 15px;
}
.kit__cap p {
	margin: 0 0 4px;
}
.kit__top {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
}
.kit__name {
	flex: 1;
}
.kit__qty {
	color: var(--lilac);
}
.kit__ref {
	color: var(--muted);
	font-size: 14px;
}
.badge {
	display: inline-grid;
	place-items: center;
	min-width: 26px;
	height: 26px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--brand);
	color: #fff;
	font: 700 15px var(--font);
	flex: 0 0 auto;
}

/* Parts de la tabla */
.parts {
	display: grid;
	gap: 16px;
	align-items: start;
}
.parts__fig {
	margin: 0;
}
.parts__img {
	position: relative;
	max-width: 420px;
}
.parts__img img {
	display: block;
	width: 100%;
}
.parts__pt {
	position: absolute;
	transform: translate(-50%, -50%);
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--brand);
	color: #fff;
	border: 2px solid #fff;
	font: 700 12px/1 var(--font);
}
.parts__views {
	display: grid;
	grid-template-columns: 1fr 1fr;
	max-width: 420px;
	text-align: center;
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	color: var(--lilac);
	letter-spacing: 0.06em;
}
.parts__legend ul {
	list-style: none;
	padding: 0;
}
.parts__legend li {
	display: flex;
	gap: 10px;
	align-items: center;
	margin: 6px 0;
}
.parts__h {
	margin: 8px 0 4px;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 14px;
	letter-spacing: 0.06em;
	color: var(--lilac);
}
@media (min-width: 768px) {
	.parts {
		grid-template-columns: minmax(0, 420px) 1fr;
	}
}

/* Passos il·lustrats */
.steps {
	list-style: none;
	padding: 0 !important;
	display: grid;
	gap: 14px;
	margin: 12px 0 16px;
}
.steps figure {
	margin: 0;
	height: 100%;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--bg);
}
.steps img {
	display: block;
	width: 100%;
	background: #fff;
}
.steps figcaption {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 10px 12px;
	font-size: 16px;
}
@media (min-width: 768px) {
	.steps--2 {
		grid-template-columns: repeat(2, 1fr);
	}
	.steps--3 {
		grid-template-columns: repeat(3, 1fr);
	}
	.steps--4 {
		grid-template-columns: repeat(4, 1fr);
	}
}
@media (min-width: 480px) and (max-width: 767.98px) {
	.steps--3,
	.steps--4 {
		grid-template-columns: repeat(2, 1fr);
	}
}
.verdict {
	flex: 0 0 auto;
	padding: 2px 8px;
	border-radius: 6px;
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
}
.verdict--ok {
	background: var(--ok);
}
.verdict--no {
	background: var(--danger);
}
.fig {
	margin: 12px 0;
}
.fig img {
	display: block;
	border-radius: var(--radius);
	border: 1px solid var(--line);
	background: #fff;
}
.fig figcaption {
	font-size: 16px;
	margin-top: 6px;
}
.figcaps {
	display: grid;
	gap: 8px;
}
.figcaps p {
	margin: 0;
	padding: 10px 12px;
	border-left: 4px solid var(--brand);
	background: var(--surface);
	border-radius: 0 8px 8px 0;
}
@media (min-width: 768px) {
	.figcaps {
		grid-template-columns: 1fr 1fr;
	}
}
.split {
	display: grid;
	gap: 12px;
	align-items: start;
}
.split .fig {
	margin: 0;
}
@media (min-width: 768px) {
	.split {
		grid-template-columns: 320px 1fr;
	}
}

/* Resolució de problemes */
.problem {
	margin: 16px 0;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
}
.problem__head {
	display: flex;
	gap: 12px;
	padding: 12px 14px;
	background: var(--surface);
}
.problem__n {
	display: grid;
	place-items: center;
	flex: 0 0 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--brand);
	color: #fff;
	font: 700 18px var(--font-head);
}
.problem__q {
	margin: 0 0 4px !important;
	font-size: 20px !important;
}
.problem__a {
	margin: 0;
	font-weight: 700;
	color: var(--lilac);
}
.problem__body {
	padding: 12px 14px;
}
.problem__body .fig img {
	max-width: 560px;
	width: 100%;
}
.trouble {
	width: 100%;
	border-collapse: collapse;
	margin: 8px 0 16px;
	font-size: 16px;
}
.trouble th,
.trouble td {
	text-align: left;
	vertical-align: top;
	padding: 10px;
	border-bottom: 1px solid var(--line);
}
.trouble thead th {
	background: var(--brand);
	color: #fff;
}
.trouble tbody th {
	font-weight: 700;
}
@media (max-width: 767.98px) {
	.trouble thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}
	.trouble,
	.trouble tbody,
	.trouble tr,
	.trouble th,
	.trouble td {
		display: block;
		width: 100%;
	}
	.trouble tr {
		margin: 0 0 12px;
		border: 1px solid var(--line);
		border-radius: var(--radius);
		overflow: hidden;
	}
	.trouble tbody th {
		background: var(--surface);
		font-size: 17px;
	}
	.trouble th,
	.trouble td {
		border: 0;
	}
	.trouble td::before {
		content: attr(data-label);
		display: block;
		font-size: 13px;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: 0.05em;
		color: var(--lilac);
	}
}

/* Preguntes freqüents */
.faq {
	margin: 10px 0;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg);
}
.faq summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	font-weight: 700;
	font-size: 18px;
	cursor: pointer;
	list-style: none;
	min-height: 52px;
}
.faq summary::-webkit-details-marker {
	display: none;
}
.faq summary::after {
	content: '+';
	font-size: 26px;
	line-height: 1;
	color: var(--lilac);
}
.faq[open] summary::after {
	content: '−';
}
.faq__a {
	padding: 0 16px 14px;
}
.faq__ref {
	font-size: 15px;
}

/* Contacte, registre, descàrregues */
.contact {
	padding: 16px;
	border-radius: var(--radius);
	background: var(--surface);
}
.contact__title {
	font: 700 26px var(--font-head);
	margin: 0 0 4px;
}
.contact__sub {
	color: var(--muted);
}
.contact__list {
	list-style: none;
	padding: 0 !important;
	display: grid;
	gap: 10px;
	margin: 0;
}
@media (min-width: 768px) {
	.contact__list {
		grid-template-columns: 1fr 1fr;
	}
}
.contact__item {
	display: flex;
	gap: 12px;
	align-items: center;
	min-height: 56px;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg);
	color: var(--ink);
	text-decoration: none;
}
.contact__label {
	display: block;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--muted);
}
.contact__value {
	display: block;
	font-weight: 700;
}
@media (prefers-color-scheme: dark) {
	.ico {
		filter: invert(1) hue-rotate(180deg);
	}
	.co-head .ico,
	.chip .ico {
		filter: none;
	}
}
.register {
	padding: 16px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.register__grid {
	display: grid;
	gap: 12px;
}
@media (min-width: 768px) {
	.register__grid {
		grid-template-columns: 1fr 1fr;
	}
}
.field label {
	display: block;
	font-weight: 700;
	font-size: 15px;
	margin-bottom: 4px;
}
.field input {
	width: 100%;
	min-height: 46px;
	padding: 8px 10px;
	font: 400 17px var(--font);
	color: var(--ink);
	background: var(--bg);
	border: 2px solid var(--line);
	border-radius: 8px;
}
.field input[readonly] {
	background: var(--surface);
}
.register__help {
	font-size: 15px;
	color: var(--muted);
	margin: 12px 0;
}
.mfr p {
	margin: 0 0 8px;
}
.downloads {
	list-style: none;
	padding: 0 !important;
	display: grid;
	gap: 8px;
}
@media (min-width: 768px) {
	.downloads {
		grid-template-columns: 1fr 1fr;
	}
}
.dl {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	padding: 10px 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	color: var(--ink);
	text-decoration: none;
}
.dl span:nth-child(2) {
	flex: 1;
}
.dl--ok {
	border-color: var(--brand);
	font-weight: 700;
}
.dl--soon {
	color: var(--muted);
}
.dl__tag {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* Peu */
.site-footer {
	margin-top: 40px;
	padding: 20px 0;
	border-top: 2px solid var(--line);
	font-size: 15px;
	color: var(--muted);
}
.site-footer p {
	margin: 0 0 8px;
}
.site-footer__risk {
	font-weight: 700;
	color: var(--ink);
}
.tr-note {
	padding: 10px 12px;
	border-radius: 8px;
	background: var(--surface);
	color: var(--ink);
}

/* Barra inferior (mòbil) i "tornar amunt" */
.bottombar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 30;
	display: grid;
	grid-template-columns: 1fr 1fr;
	background: var(--bg);
	border-top: 1px solid var(--line);
	padding-bottom: env(safe-area-inset-bottom);
}
.bottombar a,
.bottombar button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 56px;
	font: 700 17px var(--font);
	color: var(--ink);
	background: none;
	border: 0;
	text-decoration: none;
	cursor: pointer;
}
.bottombar a {
	background: var(--wa);
	color: #fff;
}
.bottombar a .ico {
	filter: brightness(0) invert(1);
}
@media (min-width: 1100px) {
	.bottombar {
		display: none;
	}
}
.totop {
	position: fixed;
	right: 16px;
	bottom: 72px;
	z-index: 25;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--ink);
	color: var(--bg);
	font-size: 24px;
	text-decoration: none;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.totop[hidden] {
	display: none;
}
@media (min-width: 1100px) {
	.totop {
		bottom: 24px;
	}
}

/* Pantalla de tria d'idioma */
.lang-overlay {
	position: fixed;
	inset: 0;
	z-index: 60;
	background: var(--bg);
	overflow: auto;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 24px 16px;
}
.lang-overlay[hidden] {
	display: none;
}
.lang-overlay__box {
	width: 100%;
	max-width: 620px;
}
.lang-overlay__logo {
	width: 160px;
	display: block;
	margin: 12px auto 16px;
}
@media (prefers-color-scheme: dark) {
	.lang-overlay__logo {
		filter: invert(1) hue-rotate(180deg);
	}
}
.lang-overlay__title {
	text-align: center;
	color: var(--muted);
	font-size: 15px;
}
.lang-overlay__list {
	list-style: none;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}
.lang-overlay button {
	width: 100%;
	min-height: 68px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	font: 700 20px var(--font);
	color: var(--ink);
	background: var(--bg);
	border: 2px solid var(--line);
	border-radius: 12px;
	cursor: pointer;
}
.lang-overlay button .code {
	font-size: 14px;
	color: var(--lilac);
	letter-spacing: 0.08em;
}
.lang-overlay button.suggested {
	border-color: var(--brand);
	background: var(--surface);
	box-shadow: 0 0 0 2px var(--brand);
}
html[data-choose] body {
	overflow: hidden;
}

/* Impressió */
@media print {
	:root {
		color-scheme: light;
	}
	* {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
	body {
		font-size: 11pt;
		background: #fff;
		color: #000;
	}
	.topbar,
	.toc,
	.bottombar,
	.totop,
	.lang-overlay,
	.skip,
	.register button,
	.site-footer__acc {
		display: none !important;
	}
	.layout {
		display: block;
		padding: 0;
	}
	main {
		padding: 0;
	}
	.faq {
		break-inside: avoid;
	}
	.faq:not([open]) > .faq__a {
		display: block;
	}
	.chapter {
		break-before: auto;
	}
	a {
		color: inherit;
		text-decoration: none;
	}
}

/* ===== v2 · portada amb targetes i un capítol a la vegada ===== */
html.js[data-view='home'] main .chapter,
html.js[data-view='chapter'] main .home,
html.js[data-view='chapter'][data-ready] main .chapter:not(.is-active) {
	display: none;
}
/* Abans que carregui el JS, el capítol de l'àncora (#id) ja es mostra sol amb :target.
   Regla a part: un navegador sense :has la descarta sencera sense afectar les de dalt. */
html.js[data-view='chapter']:not([data-ready]) main .chapter:not(:target):not(:has(:target)) {
	display: none;
}
html.js[data-view='chapter'] main .chapter.is-active {
	border-top: 0;
	margin-top: 0;
}
.chapter h2:focus {
	outline: none;
}
.flag {
	flex: 0 0 auto;
	border-radius: 3px;
	box-shadow: 0 0 0 1px var(--line);
}
.lang-select {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.home .limits {
	margin: 18px 0;
}
.cards {
	list-style: none;
	margin: 22px 0 0;
	padding: 0 !important;
	display: grid;
	gap: 10px;
}
@media (min-width: 768px) {
	.cards {
		grid-template-columns: 1fr 1fr;
	}
}
.cards li {
	margin: 0;
}
.card {
	display: flex;
	align-items: center;
	gap: 14px;
	height: 100%;
	min-height: 72px;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--bg);
	color: var(--ink);
	text-decoration: none;
}
.card:hover {
	border-color: var(--brand);
	background: var(--surface);
}
.card__n {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 6px;
	border-radius: 10px;
	background: var(--brand);
	color: #fff;
	font: 700 19px var(--font-head);
}
.card__body {
	flex: 1;
	min-width: 0;
}
.card__t {
	display: block;
	font: 700 19px/1.2 var(--font-head);
}
.card__subs {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-top: 2px;
	font-size: 14px;
	line-height: 1.35;
	color: var(--muted);
}
.card__go {
	flex: 0 0 auto;
	font-size: 20px;
	color: var(--lilac);
}
.pager {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-top: 32px;
}
.pager__link {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 56px;
	padding: 10px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	color: var(--ink);
	font-weight: 700;
	line-height: 1.25;
	text-decoration: none;
}
.pager__link:hover {
	border-color: var(--brand);
	background: var(--surface);
}
.pager__link--next {
	flex-direction: row-reverse;
	text-align: right;
}
.pager__link > span:first-child {
	color: var(--lilac);
	font-size: 20px;
}
html:not(.js) .pager {
	display: none;
}

/* Índex: cercador i subapartats del capítol actiu */
a.toc__title {
	text-decoration: none;
}
a.toc__title:hover {
	color: var(--lilac);
}
.search {
	margin: 10px 0 6px;
}
.search input {
	width: 100%;
	min-height: 46px;
	padding: 8px 12px;
	font: 400 17px var(--font);
	color: var(--ink);
	background: var(--bg);
	border: 2px solid var(--line);
	border-radius: 8px;
}
.search__results {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
}
.search__results a {
	display: block;
	padding: 8px 10px;
	border-radius: 8px;
	color: var(--ink);
	text-decoration: none;
	line-height: 1.3;
	font-size: 15px;
}
.search__results a:hover,
.search__results a:focus-visible {
	background: var(--surface);
}
.search__where {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: var(--lilac);
}
.search__empty {
	padding: 8px 10px;
	color: var(--muted);
}
.toc__list[hidden] {
	display: none;
}
.toc__sub {
	display: none;
	list-style: none;
	margin: 2px 0 6px;
	padding: 0 0 0 calc(1.6em + 20px);
}
.toc__list li[aria-current] > .toc__sub {
	display: block;
}
.toc__sub a {
	padding: 5px 8px;
	font-size: 15px;
	color: var(--muted);
}
.toc__list li[aria-current] > a {
	background: var(--surface);
	color: var(--lilac);
	font-weight: 700;
	box-shadow: inset 3px 0 0 var(--brand);
}
.toc__n {
	flex: 0 0 2em;
}
.toc__wa {
	display: none;
}
@media (min-width: 1100px) {
	.toc__wa {
		display: flex;
		align-items: center;
		gap: 8px;
		margin: 14px 0 0;
		padding: 10px 12px;
		border-radius: 8px;
		background: var(--wa);
		color: #fff;
		font-weight: 700;
		font-size: 15px;
		text-decoration: none;
	}
	.toc__wa .ico {
		filter: brightness(0) invert(1);
	}
	.toc {
		padding-right: 4px;
	}
}

/* Descàrregues amb bandera */
.dl {
	font-weight: 700;
}
.dl--current {
	border-color: var(--brand);
	background: var(--surface);
}
.dl__tag {
	color: var(--lilac);
}

/* Pantalla d'idioma amb bandera */
.lang-overlay button {
	flex-direction: row;
	justify-content: flex-start;
	gap: 12px;
	padding: 0 14px;
	text-align: left;
}
.lang-overlay button .name {
	flex: 1;
}
.callout--note .co-topic {
	text-transform: none;
}
.contact + .callout .co-topic {
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.site-footer__acc {
	margin-top: 12px;
}

@media print {
	html.js main .chapter,
	html.js main .home {
		display: block !important;
	}
	.pager,
	.cards {
		display: none !important;
	}
}

/* A la portada d'escriptori les targetes ja fan d'índex: al lateral només hi queden el cercador i el contacte */
@media (min-width: 1100px) {
	html.js[data-view='home'] .toc__list {
		display: none;
	}
}

/* El peu no es mostra fins que el capítol de l'enllaç està col·locat: així no fa cap salt */
html.js[data-view='chapter']:not([data-ready]) .site-footer {
	display: none;
}

/* Pantalles estretes (320 px): res no pot sobresortir */
body {
	overflow-wrap: break-word;
}
.pager {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.pager__link {
	min-width: 0;
	overflow-wrap: anywhere;
}
@media (max-width: 479.98px) {
	.pager {
		grid-template-columns: minmax(0, 1fr);
	}
	.pager > span:empty {
		display: none;
	}
}
@media (max-width: 359.98px) {
	.topbar {
		padding-left: 12px;
		padding-right: 12px;
	}
	.topbar__brand img {
		width: 88px;
	}
	.lang-select select {
		max-width: 124px;
	}
}
