/*
 * Gildrive DiagnostiX page (tpl-gildrive-diag.php)
 * Mobile first, on top of home.css: same tokens (audit/Design.md),
 * same section, category and business-banner components.
 */

/* ---------- Hero: violet panel with the AI Engine form in a white card ---------- */

.gh-dg-hero {
	position: relative;
	isolation: isolate;
	overflow: clip;
	padding-block: var(--gh-s4) var(--gh-s5);
	background:
		radial-gradient(120% 90% at 18% 0%, #351c66 0%, transparent 62%),
		radial-gradient(95% 80% at 92% 16%, #6d43bd 0%, transparent 58%),
		var(--gh-violet);
	color: #fff;
}

/* Commento 19: sfondo a punti in movimento — versione CSS del componente GradientDots
   indicato da Zoran. Nessuna dipendenza React nel tema, e lo scorrimento è lentissimo. */
.gh-dg-hero::before,
.gh-dg-hero::after {
	content: "";
	position: absolute;
	inset: -440px -280px;
	z-index: -1;
	pointer-events: none;
}

/* Stelline AI al posto dei punti: un riquadro che si ripete, spostato di multipli del passo
   (336 = 2 x 168, 168 = 1 x 168) così il disegno resta continuo e l'animazione usa solo transform. */
.gh-dg-hero::before {
	background-image: url("../icons/sparkle-tile.svg");
	background-repeat: repeat;
	background-size: 168px 168px;
	opacity: .17;
	animation: gh-dg-dots 120s linear infinite;
	will-change: transform;
}

@keyframes gh-dg-dots {
	to { transform: translate3d(336px, 168px, 0); }
}

/* Velo di colore che si muove lentamente sotto i punti */
.gh-dg-hero::after {
	background:
		radial-gradient(45% 55% at 80% 28%, rgba(124, 79, 218, .55), transparent 70%),
		radial-gradient(50% 60% at 26% 76%, rgba(198, 84, 172, .30), transparent 72%);
	mix-blend-mode: screen;
	animation: gh-dg-wash 48s ease-in-out infinite alternate;
}

@keyframes gh-dg-wash {
	from { transform: translate3d(-4%, -2%, 0) scale(1); }
	to   { transform: translate3d(6%, 3%, 0) scale(1.14); }
}

@media (prefers-reduced-motion: reduce) {
	.gh-dg-hero::before,
	.gh-dg-hero::after { animation: none; }
}

.gh-dg-hero__inner {
	position: relative;
	z-index: 1;
	max-width: calc(var(--gh-container) + 2 * var(--gh-gutter));
}

body .gh-home .gh-dg-hero__title {
	font-size: 32px;
	color: #fff;
}

/* Brand logo in place of the words "AI DiagnostiX"; the headline text stays for search and screen readers. */
.gh-dg-hero__logo {
	display: block;
	width: clamp(214px, 40%, 360px);
	height: auto;
}

.gh-dg-hero__sub { display: block; margin-top: .16em; font-size: clamp(26px, 3.9vw, 48px); line-height: 1.1; letter-spacing: -.02em; }

.gh-dg-hero__lead {
	margin-top: var(--gh-s3) !important;
	font-size: 18px;
	color: rgba(255, 255, 255, .9);
	max-width: 56ch;
}

.gh-dg-form {
	margin-top: var(--gh-s4);
	padding: var(--gh-s3);
	border-radius: var(--gh-r-panel);
	background: #fff;
	color: var(--gh-ink);
	scroll-margin-top: var(--gh-s4);
}

.gh-dg-hero__note {
	margin-top: var(--gh-s3) !important;
	font-size: 14px;
	color: rgba(255, 255, 255, .85);
}

/* home.css resets ul only; the numbered lists here draw their own numbers. */
:where(.gh-dg) ol { list-style: none; margin: 0; padding: 0; }

/* ---------- What you get ---------- */

.gh-dg-get {
	display: grid;
	gap: var(--gh-s3);
}

.gh-dg-get__item {
	padding: var(--gh-s4);
	border: 0;
	border-radius: var(--gh-r);
	background: var(--gh-shade);
	transition: background-color .2s var(--gh-ease);
}

.gh-dg-get__item:hover { background: var(--gh-violet-soft); }

body .gh-home .gh-dg-get__title,
body .gh-home .gh-dg-step__title,
body .gh-home .gh-dg-levels__title { font-size: 18px; margin-bottom: var(--gh-s1); }

.gh-dg-get__item p,
.gh-dg-step p { color: var(--gh-grey); }

/* ---------- Sample diagnosis ---------- */

.gh-dg-example { display: grid; gap: var(--gh-s4); }

.gh-dg-phone {
	margin: var(--gh-s4) auto 0;
	max-width: 100%;
	border-radius: var(--gh-r-panel);
	overflow: hidden;
	aspect-ratio: 9 / 16;
	background: var(--gh-violet-soft);
}

.gh-dg-phone img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Sample report: reference design for the future DiagnostiX result */

.gh-dx {
	border: 1px solid var(--gh-line);
	border-radius: var(--gh-r-panel);
	background: #fff;
	overflow: hidden;
}

.gh-dx__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--gh-s2);
	padding: var(--gh-s2) var(--gh-s3);
	background: var(--gh-violet-dim);
	color: #fff;
}

.gh-dx__brand { font-weight: 700; font-size: 16px; }
.gh-dx__brand span { font-weight: 400; opacity: .75; }

.gh-dx__chip {
	padding: 2px var(--gh-s2);
	border: 1px solid rgba(255, 255, 255, .5);
	border-radius: var(--gh-r-field);
	font-size: 14px;
	font-weight: 600;
}

.gh-dx__vehicle { padding: var(--gh-s3); }

body .gh-home .gh-dx__car { font-size: 22px; font-weight: 700; line-height: 1.25; color: var(--gh-ink); }

.gh-dx__meta { margin-top: 4px !important; color: var(--gh-grey); }

.gh-dx__said {
	margin: var(--gh-s3) 0 0;
	padding: var(--gh-s2) var(--gh-s3);
	border-radius: var(--gh-r);
	background: var(--gh-violet-soft);
}

.gh-dx__said p { margin: 4px 0 0; font-style: italic; color: var(--gh-ink); }

body .gh-home .gh-dx__label {
	margin: 0 0 var(--gh-s1);
	font-family: var(--gh-body);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	color: var(--gh-grey);
}

.gh-dx__said .gh-dx__label { display: block; margin: 0; font-size: 14px; font-weight: 600; color: var(--gh-violet); }

.gh-dx__urgency { padding: var(--gh-s3); }

.gh-dx__urgency--warn { background: #FFF8E6; }

body .gh-home .gh-dx__urgency--warn .gh-dx__label { color: #7A4B00; }

.gh-dx__level { font-size: 22px; font-weight: 700; line-height: 1.25; color: #7A4B00; }

.gh-dx__scale {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 4px;
	margin: var(--gh-s2) 0 !important;
	padding: 0 !important;
	list-style: none;
}

.gh-dx__scale li {
	padding: 6px 4px 0;
	border-top: 4px solid #EADFC4;
	font-size: 14px;
	text-align: center;
	color: var(--gh-grey);
}

.gh-dx__scale li[aria-current] { border-top-color: #D99A00; font-weight: 600; color: #7A4B00; }

.gh-dx__block { padding: var(--gh-s3); }

.gh-dx__causes { display: grid; gap: var(--gh-s2); margin: 0 !important; padding: 0 !important; list-style: none; }

.gh-dx__cause {
	padding: var(--gh-s2) var(--gh-s3);
	border: 0;
	border-radius: var(--gh-r);
	background: var(--gh-shade);
}

.gh-dx__cause:first-child { background: var(--gh-violet-soft); }

.gh-dx__cause p { margin: 0; }

body .gh-home .gh-dx__cause-title { margin-bottom: 4px; font-weight: 700; color: var(--gh-ink); }

.gh-dx__odds {
	float: right;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	margin-left: var(--gh-s2);
	font-size: 14px;
	font-weight: 600;
	color: var(--gh-violet);
}

.gh-dx__odds i { width: 6px; height: 14px; border-radius: 2px; background: var(--gh-line-strong); }
.gh-dx__odds i:first-of-type { margin-left: 4px; }
.gh-dx__odds[data-level="1"] i:nth-of-type(-n+1),
.gh-dx__odds[data-level="2"] i:nth-of-type(-n+2),
.gh-dx__odds[data-level="3"] i { background: var(--gh-violet); }

.gh-dx__split { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; background: var(--gh-shade); }
.gh-dx__split .gh-dx__block { border-bottom: 0; }


.gh-dx__price, .gh-dx__pro { font-size: 22px; font-weight: 700; line-height: 1.25; color: var(--gh-ink); }
.gh-dx__note { margin-top: 4px !important; font-size: 14px; color: var(--gh-grey); }

.gh-dx__script {
	padding-left: var(--gh-s2);
	border-left: 3px solid var(--gh-violet);
	color: var(--gh-ink);
}

.gh-dx__checks { display: grid; gap: var(--gh-s1); margin: 0 !important; padding: 0 !important; list-style: none; }

.gh-dx__checks li { position: relative; padding-left: 28px; }

.gh-dx__checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .2em;
	width: 18px;
	height: 18px;
	border-radius: var(--gh-r-field);
	border: 2px solid var(--gh-violet);
}

.gh-dx__foot { padding: var(--gh-s3); background: var(--gh-shade); }

.gh-dx__cta {
	display: inline-flex;
	align-items: center;
	gap: var(--gh-s1);
	min-height: 44px;
	padding: 0 var(--gh-s3);
	border-radius: var(--gh-r);
	background: var(--gh-violet);
	color: #fff !important;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .2s var(--gh-ease), transform .1s var(--gh-ease);
}

.gh-dx__cta:hover { background: var(--gh-violet-dim); }
.gh-dx__cta:active { transform: scale(.98); }
.gh-dx__cta svg { width: 16px; height: 16px; }

@media (max-width: 479px) {
	.gh-dx__split { grid-template-columns: 1fr; }
	
	.gh-dx__odds { float: none; display: flex; margin: 0 0 4px; }
}

/* ---------- How it works ---------- */

.gh-dg-steps { display: grid; gap: var(--gh-s3); }

.gh-dg-step {
	padding: var(--gh-s3);
	border-radius: var(--gh-r);
	background: var(--gh-shade);
}

.gh-dg-step__num {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	margin-bottom: var(--gh-s2);
	border-radius: 50%;
	background: var(--gh-violet);
	color: #fff;
	font-family: var(--gh-display);
	font-weight: 600;
}

.gh-dg-step:has(.gh-dg-step__media) { padding-top: var(--gh-s2); }

.gh-dg-step__media {
	margin: 0 0 var(--gh-s2);
	border-radius: var(--gh-r);
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: #fff;
}

.gh-dg-step__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s var(--gh-ease);
}

.gh-dg-step:hover .gh-dg-step__img,
.gh-dg-step:focus-within .gh-dg-step__img {
	transform: scale(1.05);
}

.gh-dg-step__tag {
	display: inline-block;
	margin-bottom: var(--gh-s1);
	padding: 2px var(--gh-s2);
	border-radius: var(--gh-r-field);
	background: var(--gh-violet);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
}

/* ---------- Can I keep driving? ---------- */

.gh-dg-levels { display: grid; gap: var(--gh-s3); }

.gh-dg-levels__item {
	padding: var(--gh-s3);
	border: 0;
	border-left: 4px solid var(--gh-line);
	border-radius: var(--gh-r);
	background: var(--gh-shade);
}

.gh-dg-levels__item--ok { border-left-color: #1E7F4F; }
.gh-dg-levels__item--warn { border-left-color: #C98A00; }
.gh-dg-levels__item--stop { border-left-color: #B42318; }

.gh-dg-levels__eg {
	margin-top: var(--gh-s2) !important;
	font-size: 14px;
	color: var(--gh-grey);
}

.gh-dg-levels__eg span { font-weight: 600; color: var(--gh-ink); }

.gh-dg-note {
	margin-top: var(--gh-s3) !important;
	font-size: 15px;
	color: var(--gh-ink);
	max-width: 64ch;
}

/* ---------- TSB and limits ---------- */

.gh-dg-cols { display: grid; gap: var(--gh-s4); }

.gh-home .gh-dg-prose p { margin-top: var(--gh-s3); max-width: 62ch; }

.gh-dg-prose .gh-dg-list { margin-top: var(--gh-s3); }

/* ---------- Categories (home component, here under a section head) ---------- */

.gh-dg-cats { margin-top: 0; }

/* ---------- FAQ ---------- */

.gh-dg-faq-wrap { padding-bottom: var(--gh-s5); }

.gh-dg-faq { max-width: calc(var(--gh-container) + 2 * var(--gh-gutter)); }

.gh-dg-faq__list { margin-top: var(--gh-s3); display: grid; gap: 6px; }

.gh-dg-faq__item { padding-inline: 14px; border-radius: var(--gh-r); }
.gh-dg-faq__item[open] { background: var(--gh-shade); }

.gh-dg-faq__item summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--gh-s3);
	min-height: 56px;
	padding-block: var(--gh-s2);
	cursor: pointer;
	list-style: none;
}

.gh-dg-faq__item summary::-webkit-details-marker { display: none; }

.gh-dg-faq__item summary::after {
	content: "+";
	flex: 0 0 auto;
	font-size: 24px;
	line-height: 1;
	color: var(--gh-violet);
	transition: transform .2s var(--gh-ease);
}

.gh-dg-faq__item[open] summary::after { transform: rotate(45deg); }

.gh-dg-faq__item summary:focus-visible {
	outline: 2px solid var(--gh-violet);
	outline-offset: 2px;
	border-radius: var(--gh-r);
}

body .gh-home .gh-dg-faq__q {
	font-family: var(--gh-body);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0;
}

.gh-dg-faq__item p {
	padding-bottom: var(--gh-s3);
	color: var(--gh-ink);
	max-width: 66ch;
}

/* The DiagnostiX button is white on violet in the home; here it sits on white. */
.gh-home .gh-dg-faq__cta {
	background: var(--gh-violet);
	color: #fff;
	animation: none;
}

.gh-home .gh-dg-faq__cta:hover { background: var(--gh-violet-dim); }

/* ---------- Tablet and desktop ---------- */

@media (min-width: 768px) {
	body .gh-home .gh-dg-hero__title { font-size: 44px; }
	.gh-dg-form { padding: var(--gh-s4); }
	.gh-dg-get { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gh-dg-steps,
	.gh-dg-levels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.gh-dg-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gh-home .gh-section__title { font-size: 28px; }
}

@media (min-width: 1024px) {
	.gh-dg-hero { padding-block: var(--gh-s5); }
	body .gh-home .gh-dg-hero__title { font-size: clamp(56px, 5.2vw, 76px); max-width: 20ch; }
	.gh-dg-get { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.gh-dg-example {
		grid-template-columns: 1fr 1.6fr;
		align-items: start;
	}
	/* The phone follows the reader down the sample report. */
	.gh-dg-example__intro { align-self: stretch; }
	.gh-dg-phone { position: sticky; top: 96px; }
}

@media (prefers-reduced-motion: reduce) {
	.gh-dg-get__item,
	.gh-dg-faq__item summary::after { transition: none; }
}

/* ==========================================================================
 * DiagnostiX form and report (prototype from diagnostix/report, 02/11)
 * ========================================================================== */

/* DiagnostiX input form, minimal technical style. Same tokens as report.css. */

.dxf { color: var(--gh-ink); font-variant-numeric: tabular-nums; }
.dxf fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.dxf fieldset + fieldset { margin-top: 28px; padding-top: 0; border-top: 0; }

.dxf__legend {
	display: block;
	margin-bottom: 14px;
	padding: 0;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: var(--gh-ink);
}

.dxf__grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.dxf__wide { grid-column: 1 / -1; }
.dxf [hidden] { display: none; }

.dxf__field { display: grid; gap: 4px; min-width: 0; }
.dxf__label { font-size: 14px; font-weight: 600; color: var(--gh-ink); }
.dxf__label small { font-weight: 400; color: var(--gh-grey); }

.dxf select,
.dxf input[type="text"],
.dxf textarea {
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid var(--gh-line);
	border-radius: var(--gh-r-field);
	background: #fff;
	font: inherit;
	font-size: 16px; /* 16px stops iOS from zooming on focus */
	color: var(--gh-ink);
	transition: border-color .15s var(--gh-ease);
}
.dxf select {
	appearance: none;
	padding-right: 32px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236B6C7A' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px 8px;
}
.dxf select:disabled { background-color: var(--gh-shade); color: var(--gh-grey); }
.dxf select:hover, .dxf input:hover, .dxf textarea:hover { border-color: var(--gh-line-hover); }
.dxf select:focus, .dxf input:focus, .dxf textarea:focus { outline: 0; border-color: var(--gh-violet); box-shadow: 0 0 0 3px var(--gh-violet-soft); } /* taste-skill-ignore anello di focus, accessibilita' */
.dxf textarea { min-height: 128px; resize: vertical; line-height: 1.5; }

/* Manual / automatic toggle */
.dxf__seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border: 1px solid var(--gh-line); border-radius: var(--gh-r-field); overflow: hidden; }
.dxf__seg input { position: absolute; opacity: 0; pointer-events: none; }
.dxf__seg label { display: grid; place-items: center; min-height: 42px; font-size: 14px; font-weight: 600; color: var(--gh-grey); cursor: pointer; }
.dxf__seg label + input + label { border-left: 1px solid var(--gh-line); }
.dxf__seg input:checked + label { background: var(--gh-violet); color: #fff; }
.dxf__seg input:focus-visible + label { outline: 2px solid var(--gh-violet); outline-offset: -4px; }

.dxf__meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--gh-grey); }
.dxf__count.is-short { color: var(--gh-grey); }
.dxf__hint { font-size: 13px; color: var(--gh-grey); }

/* A field left empty when the button is pressed */
.dxf__field.is-missing .dxf__label { color: #B42318; }
.dxf__field.is-missing select,
.dxf__field.is-missing input,
.dxf__field.is-missing textarea { border-color: #B42318; }

.dxf__submit {
	display: block;
	width: 100%;
	min-height: 48px;
	margin-top: 24px;
	border: 0;
	border-radius: var(--gh-r-field);
	background: var(--gh-violet);
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	cursor: pointer;
	transition: background-color .15s var(--gh-ease);
}
.dxf__submit:hover { background: var(--gh-violet-dim); }
.dxf__submit:disabled { background: var(--gh-shade); color: var(--gh-grey); cursor: progress; }
.dxf__foot { margin-top: 20px !important; font-size: 13px; text-align: center; color: var(--gh-grey); }

@media (min-width: 768px) {
	.dxf__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
	.dxf__wide { grid-column: 1 / -1; }
}

/* DiagnostiX report, minimal technical style.
   Uses only the site tokens from home.css; no own font family (fonts come from Global Fonts). */

.dx {
	--dx-accent: var(--gh-violet);
	border: 1px solid var(--gh-line);
	border-radius: var(--gh-r);
	background: #fff;
	color: var(--gh-ink);
	font-variant-numeric: tabular-nums;
}
.dx--stop { --dx-accent: #C62828; }
.dx--soon { --dx-accent: #8A5A14; }
.dx--wait { --dx-accent: #2E7D4F; }

.dx p, .dx ol, .dx ul { margin: 0; }
.dx a { text-decoration: none; }
.dx ol, .dx ul { padding: 0; list-style: none; }

/* Section rows */
.dx__row { padding: 18px 20px; }
.dx__k {
	display: block;
	margin-bottom: 6px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	color: var(--gh-grey);
}

/* Header line */
.dx__head { display: flex; justify-content: space-between; gap: 8px; background: var(--gh-shade); font-size: 13px; color: var(--gh-grey); letter-spacing: 0; text-transform: none; }
.dx__head b { color: var(--gh-ink); }

/* Key/value grid */
.dx__kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; font-size: 15px; }
.dx__kv dt { color: var(--gh-grey); font-weight: 700; }
.dx__kv dd { text-align: left; }
.dx__kv dd { margin: 0; font-weight: 600; }
.dx__money { display: block; font-size: 17px; font-weight: 700; color: var(--gh-ink); }
.dx__known { margin: 2px 0 0 !important; padding-left: 0 !important; list-style: none; font-weight: 400; display: grid; gap: 4px; }
.dx__known li { padding: 2px 0; }

/* Status: the only coloured element */
.dx__status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; border-left: 3px solid var(--dx-accent); }
.dx__level { font-size: 18px; font-weight: 700; color: var(--dx-accent); }
.dx__level::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: currentColor; vertical-align: 2px; }
.dx__drive { font-size: 14px; font-weight: 600; }
.dx__why { flex-basis: 100%; max-width: 62ch; font-size: 14px; color: var(--gh-grey); }

/* Alarm (plugin rules) */
.dx__alarm { padding: 14px 16px; background: var(--dx-accent); color: #fff; }
.dx__alarm b { display: block; margin-bottom: 6px; font-size: 16px; }
.dx__alarm li { font-size: 14px; }
.dx__alarm li::before { content: "— "; }
.dx__alarm a { color: #fff; font-weight: 700; text-decoration: underline; }

/* Diagnosis */
.dx__title { font-size: 18px; font-weight: 700; line-height: 1.3; }
.dx__text { margin-top: 4px !important; max-width: 68ch; font-size: 15px; line-height: 1.5; }
.dx__calm { margin-top: 8px !important; font-size: 14px; color: #2E7D4F; }
.dx__check { display: block; margin-top: 4px; font-size: 13px; line-height: 1.4; color: #A35A00; }

/* Causes table */
.dx__causes li { display: grid; grid-template-columns: 52px 1fr; gap: 2px 12px; padding: 12px 0; }
.dx__causes li:first-child { padding-top: 0; }
.dx__pct { grid-row: 1 / 3; font-size: 16px; font-weight: 700; color: var(--gh-violet); }
.dx__cname { font-weight: 600; }
.dx__cname i { position: relative; display: block; height: 6px; margin-top: 8px; border-radius: 3px; background: var(--gh-shade); overflow: hidden; }
.dx__cname i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); border-radius: 3px; background: var(--gh-violet); }
.dx__cdesc { max-width: 62ch; font-size: 14px; color: var(--gh-grey); }
.dx__causes .dx__cdesc { margin-top: 6px; }

/* Numbered steps */
.dx__steps { counter-reset: s; display: grid; gap: 6px; }
.dx__steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; font-size: 15px; }
.dx__steps li::before { content: counter(s) "."; font-weight: 700; color: var(--gh-violet); }

/* Ready sentence */
.dx__quote { padding: 10px 12px; border-left: 2px solid var(--gh-violet); background: var(--gh-shade); font-size: 15px; }
.dx__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--gh-line);
	border-radius: var(--gh-r-field);
	background: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--gh-violet);
	cursor: pointer;
}
.dx__quote + .dx__btn { margin-top: 10px; }
.dx__btn--main, .dx__mailrow .dx__btn { background: var(--gh-violet); border-color: var(--gh-violet); color: #fff; }
.dx__btn:disabled { opacity: .6; cursor: default; }

/* Workshops */
.dx__shops li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 15px; }
.dx__shops span { color: var(--gh-grey); }
.dx__shops a { font-weight: 600; color: var(--gh-violet); white-space: nowrap; }

/* Footer */
.dx__foot { padding: 14px 16px; background: var(--gh-shade); font-size: 13px; color: var(--gh-grey); }
.dx .dx__cta {
	display: block;
	margin-bottom: 10px;
	padding: 11px 14px;
	border-radius: var(--gh-r-field);
	background: var(--gh-violet);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
}
.dx__quota { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px !important; }
.dx__quota a { font-weight: 600; color: var(--gh-violet); }
.dx__again { margin-top: 12px; }

/* The Voxel mobile bar is fixed at the bottom: keep the end of the report clear of it. */
@media (max-width: 1023px) {
	.gh-dg-hero { padding-bottom: calc(var(--gh-s5) + 84px); }
}

/* Need more detail / off topic */
.dx__ask { counter-reset: s; }
.dx__ask li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; padding: 4px 0; font-size: 15px; }
.dx__ask li::before { content: counter(s) "."; font-weight: 700; color: var(--gh-violet); }
.dx__free { margin-top: 10px !important; font-size: 13px; color: var(--gh-grey); }

/* Page integration */
.dxf__legend small { font-weight: 400; text-transform: none; letter-spacing: 0; }
.dxf fieldset .dxf__hint:last-child { margin-top: 6px; }
.dx__plain { font-weight: 400 !important; }
.dx__muted { font-weight: 400; color: var(--gh-grey); }
.gh-dg-example .dx { scroll-margin-top: 96px; }

/* DiagnostiX live result under the form */
.dxf__result { margin-top: 20px; text-align: left; scroll-margin-top: 16px; }
.dxf__wait { padding: 18px 0; font-size: 15px; color: var(--gh-grey); animation: dxf-pulse 1.4s ease-in-out infinite; }
@keyframes dxf-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .dxf__wait { animation: none; } }

.dx__near { display: grid; gap: 6px; }
.dx__near li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 600; }
.dx .dx__near a { color: inherit; text-decoration: none; }
.dx__near span { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Print / email */
.dx__share { display: grid; gap: 16px; }
.dx__share .dx__print { justify-self: start; }
.dx__mail, .dx__rfqbox { display: grid; gap: 8px; justify-items: start; }
.dx__mail { justify-items: stretch; }
.dx__mailrow { display: flex; gap: 8px; }
.dx__mailrow input { flex: 1; min-width: 0; min-height: 40px; padding: 0 12px; border: 1px solid var(--gh-line); border-radius: var(--gh-r-field); font: inherit; font-size: 15px; }
.dx__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; } /* taste-skill-ignore campo esca anti-spam, invisibile */
.dx__mailmsg, .dx__askmsg { margin: 0; font-size: 13px; line-height: 1.45; font-weight: 400; color: var(--gh-grey); }
.dx__askmsg a { font-weight: 600; color: var(--gh-violet); }

/* Print: only the report */
@media print {
	body * { visibility: hidden; }
	#dxf-result, #dxf-result * { visibility: visible; }
	#dxf-result { position: absolute; inset: 0 auto auto 0; width: 100%; }
	.dx { box-shadow: none !important; border: 0 !important; } /* taste-skill-ignore reset di stampa */
	.dx__share, .dx__btn, .dx__cta, .dx__quota { display: none !important; }
	.dx__row { break-inside: avoid; }
}

/* ---------- DiagnostiX wait overlay (shown until the report is ready) ---------- */
.dxw-open { overflow: hidden; }
.dxw {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: 16px;
	background: rgba(32, 16, 64, .92);
}
.dxw[hidden] { display: none; }
.dxw__box {
	width: 100%;
	max-width: 420px;
	padding: 32px 24px;
	border-radius: var(--gh-r);
	background: #fff;
	text-align: center;
}
.dxw__time {
	font-size: 48px;
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	color: var(--gh-violet);
}
.dxw__status { margin-top: 10px; font-size: 14px; color: var(--gh-grey); animation: dxf-pulse 1.4s ease-in-out infinite; }
.dxw__slogan { margin-top: 24px; font-size: 22px; font-weight: 600; line-height: 1.3; color: var(--gh-ink); }
.dxw__slogan strong { display: block; color: var(--gh-violet); }
.dxw__list { margin: 18px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--gh-ink); display: grid; gap: 6px; }
.dxw__list li { padding: 8px 0; }
@media (prefers-reduced-motion: reduce) { .dxw__status { animation: none; } }


/* ---------- Legibilita': righe corte e testo corrente in inchiostro (solo /diag) ---------- */
body.page-template-tpl-gildrive-diag .gh-section__lead { max-width: 62ch !important; color: var(--gh-ink); }
body.page-template-tpl-gildrive-diag .gh-dg-faq__item p { max-width: 62ch !important; }
body.page-template-tpl-gildrive-diag .gh-dg-note { max-width: 62ch !important; }
.dx__foot p { max-width: 62ch !important; margin: 0 !important; }

/* ---------- Azioni del report: tre schede ---------- */
.dx__tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.dx__tab {
	min-height: 42px;
	padding: 0 16px;
	border: 0;
	border-radius: var(--gh-r-field);
	background: var(--gh-shade);
	color: var(--gh-ink);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
.dx__tab:hover { background: var(--gh-violet-soft); }
.dx__tab[aria-selected="true"] { background: var(--gh-violet); color: #fff; }
.dx__tab:focus-visible { outline: 2px solid var(--gh-violet); outline-offset: 2px; }
.dx__pane { display: grid; gap: 10px; justify-items: start; }
.dx__pane[hidden] { display: none; }
.dx__pane .dx__mail { width: 100%; }
.dx__pane .dx__mailrow { width: 100%; max-width: 560px; }
.dx__note { margin: 0 !important; max-width: 62ch; font-size: 14px; color: var(--gh-grey); }

/* ---------- Footer: stessi colori della home (il template Elementor e' condiviso) ---------- */
body.page-template-tpl-gildrive-diag .elementor-location-footer .ts-item-link > span,
body.page-template-tpl-gildrive-diag footer.elementor .ts-item-link > span,
body.page-template-tpl-gildrive-diag footer.elementor .ts-advanced-list a,
body.page-template-tpl-gildrive-diag footer.elementor .ts-advanced-list span {
	color: #44267d !important;
}

body.page-template-tpl-gildrive-diag footer.elementor .ts-item-link:hover > span,
body.page-template-tpl-gildrive-diag footer.elementor .ts-advanced-list a:hover {
	color: #44267d !important;
}

/* Commento 12: «Join now» diventa un pulsante nero con testo bianco al passaggio del mouse. */
body.page-template-tpl-gildrive-diag .gh-biz__join {
	padding-inline: 16px;
	border-radius: var(--gh-r-field);
	transition: background-color .2s var(--gh-ease), color .2s var(--gh-ease);
}

body.page-template-tpl-gildrive-diag .gh-biz__join:hover,
body.page-template-tpl-gildrive-diag .gh-biz__join:focus-visible {
	background: #000;
	color: #fff !important;
	text-decoration: none !important;
}
