/* ==========================================================================
   Article pages – guides (pages) and articles (posts) rendered by
   template-parts/single.php. User request 2026-10-14 ("designé les pages
   d'articles"). Loaded only there (inc/article.php), after devices.css, which
   keeps the base styles (.hg-hero, .hg-article__content, .hg-tldr, .hg-cards).

   What this file adds, mobile-first:
   - a reading-progress bar;
   - one grid shared by the title band and the body, so the text edges line up:
     a 760 px reading column and, from 1180 px, a sticky 280 px side column with
     the table of contents (scroll-spy in assets/js/article.js) and a help card;
   - numbered steps as badges, framed screenshots, an FAQ list, section marks;
   - "Lees ook" (related guides, same round cards) and a trial/abonnement band.
   Colours and fonts come from the --hg-* variables set on .hg-single in
   devices.css (themselves mapped to the Elementor global colours / tokens.css).
   ========================================================================== */

.hg-single--article {
	--hg-col: 760px;
	--hg-side: 280px;
	--hg-gap: 56px;
	--hg-pad: clamp(16px, 4vw, 32px);
	--hg-shadow: 0 12px 32px -12px rgba(7, 21, 15, 0.18);
	--hg-font-heading: var(--f-heading, "Outfit", system-ui, sans-serif);
}

/* ---- Reading progress (JS sets the width) ---- */
.hg-progress {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1001;
	width: 100%;
	height: 3px;
	pointer-events: none;
}
.hg-progress__bar {
	display: block;
	width: 0;
	height: 100%;
	background: var(--hg-accent);
}

/* ---- Shared grid: title band + body ---- */
.hg-article-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	column-gap: var(--hg-gap);
	width: 100%;
	max-width: calc(var(--hg-col) + var(--hg-gap) + var(--hg-side) + 2 * var(--hg-pad));
	margin-inline: auto;
	padding-inline: var(--hg-pad);
	box-sizing: border-box;
}
.hg-article__main {
	width: 100%;
	max-width: var(--hg-col);
	margin-inline: auto;
	min-width: 0;
}
.hg-article-wide {
	width: 100%;
	max-width: calc(var(--hg-col) + var(--hg-gap) + var(--hg-side) + 2 * var(--hg-pad));
	margin-inline: auto;
	padding-inline: var(--hg-pad);
	box-sizing: border-box;
}
.hg-side {
	display: none;
}

@media (min-width: 1180px) {
	.hg-article-grid {
		grid-template-columns: minmax(0, var(--hg-col)) var(--hg-side);
	}
	.hg-article__main {
		margin-inline: 0;
	}
	.hg-side {
		display: block;
		min-width: 0;
	}
	.hg-side__inner {
		position: sticky;
		top: calc(var(--header-h, 72px) + 24px);
		display: grid;
		gap: 16px;
		max-height: calc(100vh - var(--header-h, 72px) - 48px);
		overflow: auto;
		scrollbar-width: thin;
	}
}

/* ---- Title band: meta row (date · reading time) ---- */
.hg-single--article .hg-hero--single {
	padding: 40px 0 36px;
}
.hg-metarow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	margin: 18px 0 0;
	color: var(--hg-muted-d);
	font-size: 14px;
	line-height: 1.4;
}
.hg-metarow__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.hg-metarow__item svg {
	width: 16px;
	height: 16px;
	flex: none;
	stroke: var(--hg-accent);
}
.hg-single--article .hg-hero .hg-backbar {
	font-size: 14px;
	margin-bottom: 22px;
}
@media (min-width: 768px) {
	.hg-single--article .hg-hero--single {
		padding: 48px 0 44px;
	}
}

/* ---- Reading column ---- */
.hg-single--article .hg-article {
	padding: 32px 0 48px;
}
@media (min-width: 768px) {
	.hg-single--article .hg-article {
		padding: 44px 0 56px;
	}
}
.hg-single--article .hg-article__content {
	font-size: 17px;
	line-height: 1.72;
}
.hg-single--article .hg-article__content h2 {
	position: relative;
	margin-top: 2.1em;
	padding-top: 18px;
	font-size: clamp(26px, 1.4rem + 1.2vw, 34px);
	line-height: 1.15;
}
.hg-single--article .hg-article__content h2::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 44px;
	height: 4px;
	border-radius: 2px;
	background: var(--hg-accent);
}
.hg-single--article .hg-article__content h3 {
	margin-top: 1.6em;
	font-size: clamp(21px, 1.1rem + 0.7vw, 25px);
}
/* No section mark right after the intro + TL;DR (the first H2 follows the box). */
.hg-single--article .hg-article__content .hg-tldr + h2 {
	margin-top: 1.8em;
}

/* Screenshots: framed, centred, soft shadow. */
.hg-single--article .hg-article__content figure {
	margin: 1.5em 0;
}
.hg-single--article .hg-article__content figure img,
.hg-single--article .hg-article__content > img {
	display: block;
	margin-inline: auto;
	border: 1px solid var(--hg-border-l);
	box-shadow: var(--hg-shadow);
	background: var(--hg-light);
}
.hg-single--article .hg-article__content figcaption {
	text-align: center;
}

/* Numbered steps as badges (only when article.js runs: it keeps the start="N"
   of split lists in the CSS counter; without JS the native numbers stay). */
.hg-article--js .hg-article__content ol {
	list-style: none;
	padding-inline-start: 0;
	counter-reset: hg-step;
}
.hg-article--js .hg-article__content ol > li {
	position: relative;
	padding-left: 46px;
	counter-increment: hg-step;
}
.hg-article--js .hg-article__content ol > li + li {
	margin-top: 14px;
}
.hg-article--js .hg-article__content ol > li::before {
	content: counter(hg-step);
	position: absolute;
	top: 0;
	left: 0;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--hg-accent);
	color: var(--hg-dark);
	font-family: var(--hg-font-heading);
	font-size: 14px;
	font-weight: 700;
	line-height: 30px;
	text-align: center;
}
.hg-article--js .hg-article__content ol > li > ul {
	margin-top: 8px;
}
/* The TL;DR keeps its plain list. */
.hg-article--js .hg-article__content .hg-tldr ol > li {
	padding-left: 0;
}
.hg-article--js .hg-article__content .hg-tldr ol > li::before {
	content: none;
}

/* FAQ: each question on its own rule, with a "?" badge. All FAQ headings
   contain "vragen" in their id (veelgestelde-vragen, vragen-die-we-vaak-krijgen…). */
.hg-single--article .hg-article__content h2[id*="vragen"] ~ h3 {
	margin-top: 1.2em;
	padding-top: 1.1em;
	border-top: 1px solid var(--hg-border-l);
	font-size: clamp(19px, 1rem + 0.6vw, 22px);
	line-height: 1.3;
}
.hg-single--article .hg-article__content h2[id*="vragen"] ~ h3::before {
	content: "?";
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	margin-right: 10px;
	border-radius: 50%;
	background: var(--hg-icon-bg);
	color: var(--hg-ink);
	font-size: 15px;
	vertical-align: 3px;
}

/* ---- Contents on small screens: collapsed block at the top of the article
   (replaces the former TL;DR box, 2026-10-15; hidden once the side column shows). ---- */
.hg-toc-mobile {
	margin: 0 0 28px;
	border: 1px solid var(--hg-border-l);
	border-radius: 14px;
	background: var(--hg-light);
}
.hg-toc-mobile summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	cursor: pointer;
	list-style: none;
	color: var(--hg-ink);
	font-family: var(--hg-font-heading);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.hg-toc-mobile summary::-webkit-details-marker {
	display: none;
}
.hg-toc-mobile summary::after {
	content: "+";
	flex: none;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--hg-accent);
	color: var(--hg-dark);
	font-size: 16px;
	font-weight: 600;
	line-height: 24px;
	text-align: center;
}
.hg-toc-mobile[open] summary::after {
	content: "–";
}
.hg-toc-mobile .hg-toc {
	padding: 0 10px 10px;
	border: 0;
	background: transparent;
}
.hg-toc-mobile .hg-toc__title {
	display: none;
}
@media (min-width: 1180px) {
	.hg-toc-mobile {
		display: none;
	}
}
/* ---- Side column: contents + help ---- */
.hg-toc {
	padding: 18px 18px 14px;
	border: 1px solid var(--hg-border-l);
	border-radius: 14px;
	background: var(--hg-white);
}
.hg-toc__title {
	margin: 0 0 10px;
	color: var(--hg-ink);
	font-family: var(--hg-font-heading);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.4;
	text-transform: uppercase;
}
.hg-toc ol {
	margin: 0;
	padding: 0;
	list-style: none;
}
.hg-toc li + li {
	margin-top: 2px;
}
.hg-toc a {
	display: block;
	padding: 6px 10px 6px 12px;
	border-left: 2px solid transparent;
	border-radius: 0 8px 8px 0;
	color: var(--hg-muted);
	font-size: 14px;
	line-height: 1.35;
	text-decoration: none;
	transition: color var(--dur, 0.2s), background-color var(--dur, 0.2s), border-color var(--dur, 0.2s);
}
.hg-toc a:hover,
.hg-toc a:focus-visible {
	color: var(--hg-text);
	background: var(--hg-light);
}
.hg-toc a.is-active {
	border-left-color: var(--hg-accent);
	background: var(--hg-light);
	color: var(--hg-ink);
	font-weight: 600;
}
.hg-help {
	padding: 18px 20px 20px;
	border-radius: 14px;
	background: var(--hg-dark);
	color: var(--hg-text-d);
}
.hg-help__title {
	margin: 0 0 6px;
	font-family: var(--hg-font-heading);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.25;
}
.hg-help p {
	margin: 0 0 14px;
	color: var(--hg-muted-d);
	font-size: 14px;
	line-height: 1.5;
}
.hg-help__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border-radius: 999px;
	background: var(--hg-accent);
	color: var(--hg-dark);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color var(--dur, 0.2s);
}
.hg-help__btn:hover {
	background: var(--hg-accent-h);
}

/* ---- Lees ook (related guides, round cards from devices.css) ---- */
.hg-related {
	padding: 48px 0 56px;
	border-top: 1px solid var(--hg-border-l);
	background: var(--hg-light);
}
.hg-related__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px 20px;
	margin: 0 0 28px;
}
.hg-related__eyebrow {
	margin: 0 0 8px;
	color: var(--hg-ink);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	line-height: 1.4;
	text-transform: uppercase;
}
.hg-related__title {
	margin: 0;
	color: var(--hg-text);
	font-family: var(--hg-font-heading);
	font-size: clamp(24px, 1.2rem + 1.4vw, 32px);
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.15;
}
.hg-related__all {
	color: var(--hg-ink);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
}
@media (min-width: 768px) {
	.hg-related {
		padding: 64px 0 72px;
	}
}

/* ---- Trial / abonnement band ---- */
/* Second dark tone + hairline so the band does not merge with the dark footer. */
.hg-cta {
	padding: 48px 0 56px;
	border-bottom: 1px solid var(--hg-border-d);
	background: var(--hg-dark2) radial-gradient(55% 80% at 85% 0%, color-mix(in srgb, var(--hg-accent) 10%, transparent), transparent 70%);
	color: var(--hg-text-d);
}
.hg-cta__box {
	display: grid;
	gap: 24px;
	align-items: center;
}
.hg-cta__eyebrow {
	margin: 0 0 10px;
	color: var(--hg-accent);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	line-height: 1.4;
	text-transform: uppercase;
}
.hg-cta__title {
	margin: 0;
	font-family: var(--hg-font-heading);
	font-size: clamp(26px, 1.3rem + 1.6vw, 36px);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.1;
}
.hg-cta__text {
	margin: 12px 0 0;
	max-width: 56ch;
	color: var(--hg-muted-d);
	font-size: 16px;
	line-height: 1.6;
}
.hg-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
.hg-cta__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 22px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color var(--dur, 0.2s), border-color var(--dur, 0.2s), color var(--dur, 0.2s);
}
.hg-cta__btn--primary {
	background: var(--hg-accent);
	color: var(--hg-dark);
}
.hg-cta__btn--primary:hover {
	background: var(--hg-accent-h);
}
.hg-cta__btn--ghost {
	border-color: var(--hg-border-d);
	color: var(--hg-text-d);
}
.hg-cta__btn--ghost:hover {
	border-color: var(--hg-accent);
	color: var(--hg-accent);
}
@media (min-width: 900px) {
	.hg-cta {
		padding: 64px 0 72px;
	}
	.hg-cta__box {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 40px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hg-toc a,
	.hg-help__btn,
	.hg-cta__btn {
		transition: none;
	}
}
