/* Veterantraktor Verktyg – sprängskiss [vt_explosion]
   Färger och typsnitt från temat veterantraktor-child (med reserver om temat byts). */
.vtx {
	--vtx-ink: var(--vt-ink, #1f1c18);
	--vtx-ink-2: #2a2520;
	--vtx-cream: var(--vt-cream, #f5f0e6);
	--vtx-on-dark: var(--vt-on-dark, #d9cfbf);
	--vtx-red: var(--vt-red, #8a3a1c);
	--vtx-gilt: var(--vt-gilt, #c8902e);
	--vtx-gilt-light: var(--vt-gilt-light, #e2b563);
	--vtx-head: var(--vt-font-head, "Zilla Slab", Georgia, serif);
	position: relative;
	margin: 2.5rem 0;
	color: var(--vtx-on-dark);
	background: radial-gradient(ellipse 70% 60% at 50% 55%, #36302a 0%, var(--vtx-ink) 70%) var(--vtx-ink);
	border-block: 4px solid var(--vtx-red);
	border-radius: 6px;
}
.vtx .vtx__scen { padding: clamp(18px, 3vw, 32px); }
.vtx .vtx__etikett {
	margin: 0 0 .25rem; font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--vtx-gilt-light);
}
.vtx .vtx__scen .vtx__rubrik { margin: 0; padding: 0; border: 0; font-family: var(--vtx-head); font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); line-height: 1.15; color: var(--vtx-cream); }
/* Artiklar kan ha egen CSS med !important på rubrikfärger (.vt-wrap h2/h3) */
section.vtx .vtx__scen h2.vtx__rubrik, section.vtx .vtx__del h3 { color: var(--vtx-cream) !important; }
.vtx .vtx__tips { display: none; margin: .4rem 0 0; font-size: .9375rem; color: var(--vtx-on-dark); }
.vtx .vtx__bild { position: relative; margin: 1rem 0; }
.vtx .vtx__affisch { display: block; width: 100%; height: auto; }
.vtx .vtx__canvas, .vtx .vtx__punkter, .vtx .vtx__laddar, .vtx .vtx__framsteg { display: none; }

/* Lista utan JavaScript eller med reducerad rörelse */
.vtx .vtx__delar { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.vtx .vtx__del {
	position: relative; margin: 0; padding: 14px 16px 14px 52px;
	background: rgba(245, 240, 230, .06); border: 1px solid rgba(200, 144, 46, .35); border-radius: 6px;
}
.vtx .vtx__del h3 { margin: 0 0 .3rem; padding: 0; border: 0; font-family: var(--vtx-head); font-size: 1.125rem; line-height: 1.25; color: var(--vtx-cream); }
.vtx .vtx__del p { margin: 0; font-size: .9688rem; line-height: 1.55; color: var(--vtx-on-dark); }
.vtx .vtx__nr, .vtx .vtx__punkt {
	display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
	font: 700 .8125rem/1 var(--vtx-head); color: var(--vtx-ink); background: var(--vtx-gilt-light);
	box-shadow: 0 0 0 3px rgba(31, 28, 24, .85);
}
.vtx .vtx__nr { position: absolute; left: 14px; top: 14px; }

/* ---------- Scrollstyrt läge (sätts av JavaScript) ----------
   Håller sig inom innehållsspaltens bredd. Bilden överst, inforutan alltid under bilden (aldrig över delarna). */
.vtx.vtx--live {
	height: calc(var(--vtx-hojd, 320) * 1vh);
	height: calc(var(--vtx-hojd, 320) * 1svh);
}
.vtx.vtx--live .vtx__scen {
	position: sticky; top: var(--vtx-top, 0px);
	height: calc(100vh - var(--vtx-top, 0px)); height: calc(100svh - var(--vtx-top, 0px));
	max-height: 900px; overflow: hidden; box-sizing: border-box;
	display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px;
	padding: clamp(16px, 3vw, 28px);
}
.vtx.vtx--live .vtx__huvud { position: relative; z-index: 3; }
.vtx.vtx--live .vtx__tips { display: block; transition: opacity .4s ease; }
.vtx.vtx--live .vtx__tips::after { content: " ↓"; color: var(--vtx-gilt-light); }
.vtx.vtx--scrollat .vtx__tips { opacity: 0; }
.vtx.vtx--live .vtx__bild { position: relative; margin: 0; min-height: 0; }
.vtx.vtx--live .vtx__affisch { display: none; }
.vtx.vtx--live .vtx__canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.vtx.vtx--live .vtx__punkter { display: block; position: absolute; inset: 0; pointer-events: none; }
.vtx.vtx--live .vtx__punkt {
	position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(.6); opacity: 0;
	transition: opacity .35s ease, transform .35s ease;
}
.vtx.vtx--live .vtx__punkt.is-aktiv { opacity: 1; transform: translate(-50%, -50%) scale(1); animation: vtx-puls 2s ease-out infinite; }
@keyframes vtx-puls {
	0% { box-shadow: 0 0 0 3px rgba(31, 28, 24, .85), 0 0 0 3px rgba(226, 181, 99, .55); }
	100% { box-shadow: 0 0 0 3px rgba(31, 28, 24, .85), 0 0 0 18px rgba(226, 181, 99, 0); }
}

/* Laddningsstapel */
.vtx.vtx--live .vtx__laddar {
	display: block; position: absolute; left: 50%; bottom: 8%; width: min(240px, 50%); height: 3px; transform: translateX(-50%);
	background: rgba(245, 240, 230, .12); border-radius: 2px; overflow: hidden; transition: opacity .5s ease;
}
.vtx .vtx__laddar i { display: block; height: 100%; width: 0; background: var(--vtx-gilt-light); transition: width .2s linear; }
.vtx.vtx--klar .vtx__laddar { opacity: 0; }

/* Framstegslinje i nederkanten */
.vtx.vtx--live .vtx__framsteg { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(245, 240, 230, .08); z-index: 4; }
.vtx .vtx__framsteg i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: var(--vtx-gilt); }

/* Inforutor: alla i samma rutnätscell under bilden – höjden blir den längsta rutans, inget hoppar */
.vtx.vtx--live .vtx__delar { display: grid; grid-template-columns: 1fr; gap: 0; }
.vtx.vtx--live .vtx__del {
	grid-area: 1 / 1; position: relative;
	opacity: 0; visibility: hidden; transform: translateY(8px);
	transition: opacity .4s ease, transform .4s ease, visibility 0s linear .4s;
}
.vtx.vtx--live .vtx__del.is-aktiv { opacity: 1; visibility: visible; transform: none; transition: opacity .4s ease, transform .4s ease, visibility 0s; }

@media (prefers-reduced-motion: reduce) {
.vtx * { transition: none !important; animation: none !important; }
}
