/*
 * The Garden of Memory: escenas y componentes de la página del proyecto ([jc_jardin tipo="…"]).
 * Solo se carga en esa página. Todo está bajo .jgm (y .jgm-rail, la cuerda de capítulos): no modifica
 * estilos globales. Esquinas rectas y líneas de 1 px, como la navegación entre proyectos.
 *
 * El CSS de WoodMart se carga después: por eso cada regla lleva .jgm delante (gana por especificidad
 * a los selectores de etiqueta del tema) y se neutralizan sus variables de botón.
 */

.jgm,
.jgm-rail {
	--jgm-line: var(--jc-line, rgba(255, 255, 255, .14));
	--jgm-text: var(--jc-text, rgba(255, 255, 255, .8));
	--jgm-muted: var(--jc-muted, rgba(255, 255, 255, .58));
	--jgm-accent: var(--jc-accent, #c79bff);
	--jgm-ease: var(--jc-ease, cubic-bezier(.22, 1, .36, 1));
	--btn-color: currentColor;
	--btn-color-hover: currentColor;
	--btn-bgcolor: transparent;
	--btn-bgcolor-hover: transparent;
	--btn-brd-width: 0px;
	--btn-brd-color: transparent;
	--btn-brd-color-hover: transparent;
	--btn-brd-radius: 0px;
	--btn-box-shadow: none;
	--btn-box-shadow-hover: none;
	--btn-transform: none;
	--btn-font-weight: inherit;
	--btn-font-family: inherit;
	--btn-padding: 0;
	--btn-height: 0;
	--btn-font-size: inherit;
}

.jgm {
	width: 100%;
	margin: 0;
	color: var(--jgm-text);
	font-family: var(--wd-text-font, sans-serif);
	font-size: 15px;
	line-height: 1.6;
	text-align: left;
}

.jgm :is(p, ol, ul, dl, dd, dt, figure, blockquote, li) {
	margin: 0;
	padding: 0;
}

.jgm :is(ol, ul) {
	list-style: none;
}

.jgm li::before {
	content: none;
}

.jgm blockquote {
	border: 0;
	font-style: normal;
}

.jgm button {
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-transform: none;
	cursor: pointer;
}

/* Rótulo pequeño en mayúsculas espaciadas: antetítulos, leyendas y controles. */
.jgm :is(.jgm__tag, .jgm__hint, .jgm__legend, .jgm__steps, .jgm-index__label, .jgm-index__n, .jgm-flow__where, .jgm-map__kind, .jgm-map__go, .jgm-map__hint, .jgm-sheet__h, .jgm-sheet__dl dt, .jgm-sheet__year, .jgm-table__row--head, .jgm-count__l, .jgm-quote footer, .jgm-dyes span),
.jgm .jgm__ctrl button,
.jgm summary {
	font-family: var(--wd-text-font, sans-serif);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .18em;
	line-height: 1.6;
	text-transform: uppercase;
}

/* ------------------------------------------------------------------ figura con lienzo */

figure.jgm {
	border: 1px solid var(--jgm-line);
	background: #000;
}

.jgm__stage {
	position: relative;
	aspect-ratio: 16 / 9;
	max-height: 84svh;
	width: 100%;
	overflow: hidden;
	background: #000;
}

.jgm__canvas {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	touch-action: pan-y;
}

/* Las capas de trazos se apagan por pasos: el contraste lleva a negro lo que queda. */
.jgm:is(.jgm--huella, .jgm--semilla, .jgm--polifonia, .jgm--retrato) .jgm__canvas {
	filter: contrast(1.14) brightness(1.05);
}

.jgm--tiempo .jgm__canvas {
	cursor: grab;
}

.jgm--tiempo .jgm__canvas:active {
	cursor: grabbing;
}

.jgm--band .jgm__stage {
	aspect-ratio: 6 / 1;
}

.jgm .jgm__tag,
.jgm .jgm__hint {
	position: absolute;
	left: clamp(14px, 2vw, 24px);
	z-index: 1;
	max-width: calc(100% - 28px);
	color: var(--jgm-muted);
	pointer-events: none;
}

.jgm .jgm__tag {
	top: clamp(12px, 1.8vw, 22px);
}

.jgm .jgm__hint {
	bottom: clamp(12px, 1.8vw, 20px);
	color: rgba(255, 255, 255, .5);
}

.jgm__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px 32px;
	padding: 16px clamp(14px, 2vw, 24px) 18px;
	border-top: 1px solid var(--jgm-line);
}

.jgm .jgm__cap {
	flex: 1 1 340px;
	max-width: 70ch;
	color: var(--jgm-muted);
	font-size: 13.5px;
	line-height: 1.65;
}

/* Pie del rizoma: solo la descripción de la red que se muestra. Reserva dos líneas para que los
   botones no salten al cambiar de red. */
.jgm .jgm__desc {
	display: none;
}

.jgm .jgm__desc.is-on {
	display: block;
	min-height: 3.3em;
}

/* Controles: tipo de red. */
.jgm .jgm__ctrl {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.jgm .jgm__ctrl button {
	padding: 9px 14px;
	border: 1px solid var(--jgm-line);
	color: var(--jgm-muted);
	transition: color .3s ease, background-color .3s ease, border-color .3s ease;
}

.jgm .jgm__ctrl button:hover {
	border-color: rgba(255, 255, 255, .5);
	color: #fff;
}

.jgm .jgm__ctrl button[aria-pressed="true"] {
	border-color: #fff;
	background: #fff;
	color: #000;
}

.jgm button:focus-visible,
.jgm a:focus-visible,
.jgm summary:focus-visible,
.jgm-rail a:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

/* Leyenda de la geografía del tiempo. */
.jgm .jgm__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
	color: var(--jgm-muted);
}

.jgm .jgm__legend li {
	display: inline-flex;
	align-items: center;
	gap: 9px;
}

.jgm__key {
	display: inline-block;
	flex: none;
	width: 18px;
	height: 0;
	border-top: 2px solid #fff;
}

.jgm__key--stay {
	width: 0;
	height: 14px;
	border-top: 0;
	border-left: 2px solid #fff;
}

.jgm__key--dot {
	width: 8px;
	height: 8px;
	border: 0;
	border-radius: 50%;
	background: #ffd159;
	box-shadow: 0 0 10px #ffd159;
}

.jgm__key--dash {
	border-top: 2px dashed var(--jgm-muted);
}

/* Pasos del retrato: el actual se enciende. */
.jgm .jgm__steps {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
	counter-reset: jgm-step;
	color: rgba(255, 255, 255, .4);
}

.jgm .jgm__steps li {
	counter-increment: jgm-step;
	transition: color .4s ease;
}

.jgm .jgm__steps li::before {
	content: counter(jgm-step, decimal-leading-zero) "\00a0\00a0";
	color: rgba(255, 255, 255, .3);
	transition: color .4s ease;
}

.jgm .jgm__steps li[aria-current="step"] {
	color: #fff;
}

.jgm .jgm__steps li[aria-current="step"]::before {
	color: var(--jgm-accent);
}

/* Las cuatro piezas junto a la espiral. */
.jgm .jgm__pieces {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, auto));
	gap: 4px 26px;
	counter-reset: jgm-piece;
}

.jgm .jgm__pieces li {
	counter-increment: jgm-piece;
}

.jgm .jgm__pieces button {
	display: inline-flex;
	align-items: baseline;
	gap: 10px;
	padding: 4px 0;
	color: var(--jgm-muted);
	font-size: 14px;
	text-align: left;
	transition: color .3s ease;
}

.jgm .jgm__pieces button::before {
	content: counter(jgm-piece, upper-roman);
	min-width: 1.6em;
	color: var(--jgm-piece, #fff);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .14em;
}

.jgm .jgm__pieces li:nth-child(1) { --jgm-piece: #ffd78a; }
.jgm .jgm__pieces li:nth-child(2) { --jgm-piece: #c9ffd7; }
.jgm .jgm__pieces li:nth-child(3) { --jgm-piece: #d7ccff; }
.jgm .jgm__pieces li:nth-child(4) { --jgm-piece: #ffe59a; }

.jgm .jgm__pieces button:hover,
.jgm .jgm__pieces button[aria-pressed="true"] {
	color: #fff;
}

.jgm .jgm__pieces button[aria-pressed="true"] em {
	text-decoration: underline;
	text-decoration-color: var(--jgm-piece);
	text-underline-offset: .25em;
}

/* Cita sobre la huella. */
.jgm .jgm-quote {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: clamp(14px, 2vw, 26px);
	padding: clamp(20px, 5vw, 72px);
	pointer-events: none;
}

.jgm .jgm-quote p {
	max-width: 22ch;
	color: #fff;
	font-family: var(--wd-title-font, inherit);
	font-size: clamp(22px, 2.5vw + 9px, 48px);
	font-weight: 600;
	letter-spacing: -.015em;
	line-height: 1.14;
	text-wrap: balance;
	text-shadow: 0 0 24px #000, 0 0 60px rgba(0, 0, 0, .9);
}

.jgm .jgm-quote footer {
	max-width: 46ch;
	color: rgba(255, 255, 255, .7);
	text-shadow: 0 0 14px #000;
}

/* La cita sola, sin lienzo ni marco ([jc_jardin tipo="huella"]). */
figure.jgm.jgm-cita {
	border: 0;
	background: none;
}

.jgm.jgm-cita .jgm-quote {
	position: static;
	padding: 0;
}

.jgm.jgm-cita .jgm-quote p {
	max-width: 24ch;
	text-shadow: none;
}

.jgm.jgm-cita .jgm-quote footer {
	text-shadow: none;
}

/* Contador de versiones. */
.jgm .jgm-count {
	position: absolute;
	top: clamp(16px, 4vw, 52px);
	left: clamp(16px, 4vw, 56px);
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
	pointer-events: none;
}

.jgm .jgm-count__n {
	color: #fff;
	font-family: var(--wd-title-font, inherit);
	font-size: clamp(72px, 15vw, 210px);
	font-variant-numeric: tabular-nums;
	font-weight: 100;
	letter-spacing: -.04em;
	line-height: .82;
	text-shadow: 0 0 30px #000;
}

.jgm .jgm-count__l {
	color: var(--jgm-accent);
}

/* ------------------------------------------------------------------ índice y cuerda de capítulos */

.jgm-index {
	padding-block: clamp(18px, 2.4vw, 30px);
	border-block: 1px solid var(--jgm-line);
}

.jgm .jgm-index__label {
	margin-bottom: 14px;
	color: var(--jgm-accent);
}

.jgm .jgm-index__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 4px clamp(16px, 3vw, 48px);
}

.jgm .jgm-index__list a {
	display: flex;
	align-items: baseline;
	gap: 12px;
	padding: 8px 0;
	color: #fff;
	text-decoration: none;
}

.jgm .jgm-index__n {
	color: var(--jgm-muted);
	font-variant-numeric: tabular-nums;
}

.jgm .jgm-index__t {
	font-family: var(--wd-title-font, inherit);
	font-size: clamp(15px, .5vw + 13px, 19px);
	font-weight: 600;
	line-height: 1.25;
	background: linear-gradient(var(--jgm-accent) 0 0) 0 100% / 0 1px no-repeat;
	transition: background-size .5s var(--jgm-ease);
}

.jgm .jgm-index__list a:is(:hover, :focus-visible) .jgm-index__t {
	background-size: 100% 1px;
}

.jgm-rail {
	position: fixed;
	top: 50%;
	right: 14px;
	z-index: 340;
	display: none;
	flex-direction: column;
	transform: translateY(-50%);
	opacity: 0;
	pointer-events: none;
	transition: opacity .5s ease;
}

.jgm-rail.is-on {
	opacity: 1;
	pointer-events: auto;
}

@media (min-width: 1360px) and (hover: hover) {
	.jgm-rail {
		display: flex;
	}
}

.jgm-rail a {
	position: relative;
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	gap: 12px;
	height: 30px;
	color: #fff;
	font-family: var(--wd-text-font, sans-serif);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .18em;
	text-decoration: none;
	text-transform: uppercase;
}

/* La cuerda y sus nudos. */
.jgm-rail a::before {
	content: "";
	position: absolute;
	top: 0;
	right: 4px;
	width: 1px;
	height: 100%;
	background: rgba(255, 255, 255, .22);
}

.jgm-rail a i {
	position: relative;
	z-index: 1;
	flex: none;
	width: 9px;
	height: 9px;
	border: 1px solid rgba(255, 255, 255, .6);
	border-radius: 50%;
	background: #000;
	transition: background-color .3s ease, border-color .3s ease, transform .4s var(--jgm-ease);
}

/* La etiqueta flota a la izquierda del nudo, fuera del flujo: oculta, no ocupa sitio ni recibe clics
   (antes tapaba los botones del contenido que quedaban debajo, como el del teléfono de Liminal Garden). */
.jgm-rail a span {
	position: absolute;
	top: 50%;
	right: 21px;
	padding: 3px 8px;
	background: rgba(0, 0, 0, .86);
	opacity: 0;
	transform: translate(6px, -50%);
	transition: opacity .3s ease, transform .4s var(--jgm-ease);
	white-space: nowrap;
	pointer-events: none;
}

.jgm-rail:hover a span,
.jgm-rail a:focus-visible span {
	opacity: .75;
	transform: translate(0, -50%);
	pointer-events: auto;
}

.jgm-rail a:hover span {
	opacity: 1;
}

.jgm-rail a[aria-current="true"] i {
	border-color: var(--jgm-accent);
	background: var(--jgm-accent);
	transform: scale(1.25);
}

/* ------------------------------------------------------------------ tejidos y tintes */

.jgm-weave__row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(10px, 1.4vw, 20px);
}

.jgm-weave__img {
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: #0b0a0d;
}

.jgm .jgm-weave__img img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
	transition: transform 1.2s var(--jgm-ease);
}

@media (hover: hover) {
	.jgm-weave__item:hover img {
		transform: scale(1.035);
	}
}

.jgm .jgm-weave__item figcaption {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding-top: 12px;
	font-size: 13.5px;
	line-height: 1.5;
}

.jgm .jgm-weave__item strong {
	color: #fff;
	font-family: var(--wd-title-font, inherit);
	font-size: 15px;
	font-weight: 600;
}

.jgm .jgm-weave__item small {
	color: rgba(255, 255, 255, .45);
	font-size: 11px;
	line-height: 1.5;
}

.jgm-dyes {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: clamp(6px, 1vw, 12px);
	margin-top: clamp(28px, 4vw, 52px);
}

.jgm-dyes__item {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.jgm-dyes__item i {
	display: block;
	height: clamp(40px, 6vw, 72px);
	margin-bottom: 7px;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.jgm .jgm-dyes__item strong {
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.jgm .jgm-dyes span {
	color: var(--jgm-muted);
	font-size: 10px;
	letter-spacing: .14em;
}

/* ------------------------------------------------------------------ del gesto al pigmento */

.jgm-flow {
	padding: clamp(22px, 3.4vw, 48px);
	border: 1px solid var(--jgm-line);
}

.jgm .jgm-flow__title {
	margin-bottom: clamp(24px, 3.4vw, 44px);
	color: #fff;
	font-family: var(--wd-title-font, inherit);
	font-size: clamp(20px, 1vw + 15px, 30px);
	font-weight: 600;
	letter-spacing: -.01em;
	line-height: 1.2;
}

.jgm-flow__track {
	position: relative;
}

.jgm-flow__track::before {
	content: "";
	position: absolute;
	top: 5px;
	left: 0;
	right: 0;
	height: 1px;
	background: var(--jgm-line);
}

.jgm .jgm-flow__steps {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.jgm .jgm-flow__steps li {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	padding: 30px clamp(12px, 2vw, 30px) 0 0;
}

.jgm .jgm-flow__steps li::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 11px;
	height: 11px;
	border: 1px solid var(--jgm-accent);
	border-radius: 50%;
	background: #000;
}

.jgm .jgm-flow__where {
	color: var(--jgm-muted);
}

.jgm .jgm-flow__steps strong {
	color: #fff;
	font-family: var(--wd-title-font, inherit);
	font-size: clamp(19px, 1vw + 14px, 28px);
	font-weight: 600;
	line-height: 1.1;
}

.jgm .jgm-flow__what {
	max-width: 32ch;
	color: var(--jgm-muted);
	font-size: 14px;
	line-height: 1.55;
}

/* El retrato que recorre la cadena. */
.jgm-flow__spark {
	position: absolute;
	top: 2px;
	left: 0;
	z-index: 1;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 12px var(--jgm-accent), 0 0 3px #fff;
	animation: jgm-travel 5.5s linear infinite;
}

.jgm-flow__spark:nth-of-type(2) { animation-delay: -1.8s; }
.jgm-flow__spark:nth-of-type(3) { animation-delay: -3.6s; }

@keyframes jgm-travel {
	0% { left: 0; opacity: 0; }
	6% { opacity: 1; }
	94% { opacity: 1; }
	100% { left: 100%; opacity: 0; }
}

@keyframes jgm-travel-down {
	0% { top: 0; opacity: 0; }
	6% { opacity: 1; }
	94% { opacity: 1; }
	100% { top: 100%; opacity: 0; }
}

.jgm .jgm-flow__facts {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px clamp(12px, 2vw, 30px);
	margin-top: clamp(30px, 4.4vw, 60px);
	padding-top: clamp(20px, 2.6vw, 32px);
	border-top: 1px solid var(--jgm-line);
}

.jgm .jgm-flow__facts dt {
	color: #fff;
	font-family: var(--wd-title-font, inherit);
	font-size: clamp(34px, 3.4vw + 12px, 64px);
	font-weight: 100;
	letter-spacing: -.02em;
	line-height: 1;
}

.jgm .jgm-flow__facts dd {
	max-width: 26ch;
	margin-top: 10px;
	color: var(--jgm-muted);
	font-size: 13px;
	line-height: 1.5;
}

/* ------------------------------------------------------------------ el rizoma aplicado */

.jgm-table__row {
	display: grid;
	grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.4fr);
	gap: 8px clamp(14px, 2.4vw, 40px);
	align-items: baseline;
	padding-block: clamp(12px, 1.6vw, 20px);
	border-top: 1px solid var(--jgm-line);
}

.jgm .jgm-table__row--head {
	padding-block: 0 10px;
	border-top: 0;
	color: var(--jgm-accent);
}

.jgm .jgm-table__row strong {
	color: #fff;
	font-family: var(--wd-title-font, inherit);
	font-size: clamp(17px, .6vw + 14px, 22px);
	font-weight: 600;
	line-height: 1.2;
}

.jgm-table__row:not(.jgm-table__row--head) > span:nth-child(2) {
	color: var(--jgm-muted);
	font-size: 14px;
}

.jgm-table__row:not(.jgm-table__row--head) > span:nth-child(3) {
	color: rgba(255, 255, 255, .9);
	font-size: clamp(15px, .3vw + 14px, 17px);
}

/* ------------------------------------------------------------------ mapa de la investigación */

.jgm-map {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 14px clamp(16px, 2.4vw, 36px);
	align-items: center;
}

.jgm-map__scroll {
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, .3) transparent;
}

.jgm-map__svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.jgm-map__edge {
	fill: none;
	stroke: rgba(255, 255, 255, .17);
	stroke-width: 1;
	transition: stroke .35s ease, opacity .35s ease;
}

.jgm-map__node {
	cursor: pointer;
	outline: none;
	transition: opacity .35s ease;
}

.jgm-map__dot {
	fill: none;
	stroke: rgba(255, 255, 255, .6);
	stroke-width: 1.5;
	transition: fill .35s ease, stroke .35s ease;
}

.jgm-map__node--c .jgm-map__dot {
	fill: #ece6dc;
	stroke: none;
}

.jgm-map__node text {
	fill: #fff;
	font-family: var(--wd-title-font, inherit);
	font-weight: 600;
}

.jgm-map__node--a text {
	fill: rgba(255, 255, 255, .62);
	font-family: var(--wd-text-font, sans-serif);
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.jgm-map__svg.is-focus .jgm-map__edge {
	opacity: .14;
}

.jgm-map__svg.is-focus .jgm-map__edge.is-on {
	opacity: 1;
	stroke: #fff;
	stroke-dasharray: 4 6;
	animation: jgm-dash 1.2s linear infinite;
}

.jgm-map__svg.is-focus .jgm-map__node {
	opacity: .24;
}

.jgm-map__svg.is-focus .jgm-map__node.is-on {
	opacity: 1;
}

.jgm-map__node.is-current .jgm-map__dot {
	fill: var(--jgm-accent);
	stroke: var(--jgm-accent);
}

.jgm-map__node:focus-visible .jgm-map__dot {
	stroke: #fff;
	stroke-width: 3;
}

@keyframes jgm-dash {
	to { stroke-dashoffset: -20; }
}

.jgm-map__card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 210px;
	padding-left: clamp(14px, 1.8vw, 26px);
	border-left: 1px solid var(--jgm-line);
}

.jgm .jgm-map__kind {
	color: var(--jgm-accent);
}

.jgm .jgm-map__title {
	color: #fff;
	font-family: var(--wd-title-font, inherit);
	font-size: clamp(24px, 1.2vw + 18px, 36px);
	font-weight: 600;
	letter-spacing: -.01em;
	line-height: 1.08;
}

.jgm .jgm-map__text {
	color: var(--jgm-text);
	font-size: 15px;
}

.jgm .jgm-map__go {
	align-self: flex-start;
	margin-top: 4px;
	padding-bottom: 3px;
	border-bottom: 1px solid var(--jgm-accent);
	color: #fff;
	text-decoration: none;
}

.jgm .jgm-map__hint {
	grid-column: 1 / -1;
	color: rgba(255, 255, 255, .45);
}

/* ------------------------------------------------------------------ ficha, exposiciones y fuentes */

.jgm-sheet {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(28px, 4vw, 56px) clamp(24px, 5vw, 96px);
	padding-top: clamp(22px, 3vw, 40px);
	border-top: 1px solid var(--jgm-line);
}

.jgm .jgm-sheet__h {
	margin-bottom: 14px;
	color: var(--jgm-accent);
}

.jgm .jgm-sheet__dl > div,
.jgm .jgm-sheet__list li {
	display: grid;
	grid-template-columns: minmax(96px, .42fr) minmax(0, 1fr);
	gap: 4px 18px;
	padding-block: 11px;
	border-top: 1px solid var(--jgm-line);
}

.jgm .jgm-sheet__list li {
	grid-template-columns: 56px minmax(0, 1fr);
}

.jgm .jgm-sheet__dl dt,
.jgm .jgm-sheet__year {
	padding-top: 3px;
	color: var(--jgm-muted);
	font-weight: 700;
}

.jgm .jgm-sheet__dl dd,
.jgm .jgm-sheet__list span:last-child {
	color: rgba(255, 255, 255, .9);
	font-size: 15px;
	line-height: 1.5;
}

.jgm .jgm-sheet em {
	color: #fff;
}

.jgm-sheet__sources {
	grid-column: 1 / -1;
	border-block: 1px solid var(--jgm-line);
}

.jgm summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 0;
	color: #fff;
	cursor: pointer;
	list-style: none;
}

.jgm summary::-webkit-details-marker {
	display: none;
}

.jgm summary::after {
	content: "";
	width: 9px;
	height: 9px;
	margin-right: 4px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-3px) rotate(45deg);
	transition: transform .4s var(--jgm-ease);
}

.jgm details[open] summary::after {
	transform: translateY(2px) rotate(-135deg);
}

.jgm .jgm-sheet__sources ul {
	columns: 2;
	column-gap: clamp(24px, 5vw, 96px);
	padding-bottom: 20px;
}

.jgm .jgm-sheet__sources li {
	break-inside: avoid;
	padding-block: 5px;
	color: var(--jgm-muted);
	font-size: 13.5px;
	line-height: 1.5;
}

/* ------------------------------------------------------------------ encaje con las secciones de jc-obras */

/* Un texto seguido de su figura comparte con ella un espacio corto. */
body.jc-obra .e-con.jc-sec.jc-sec--lead {
	--padding-bottom: var(--jc-space-tight);
}

body.jc-obra .jc-escena > .elementor-widget-shortcode {
	width: 100%;
}

/* Dos bloques en una fila en escritorio (la imagen y el vídeo del retrato como pigmento). En tablet y
   móvil van uno debajo del otro, y el vídeo sigue a sangre como cuando era un bloque propio. */
body.jc-obra .e-con.jc-par > .e-con {
	--padding-top: 0px;
	--padding-bottom: 0px;
	--padding-left: 0px;
	--padding-right: 0px;
	width: 100%;
	margin: 0;
}

@media (min-width: 1025px) {
	body.jc-obra .e-con.jc-par {
		--display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: clamp(16px, 2vw, 32px);
		align-items: start;
	}

	/* El vídeo (16:9) marca la altura de la fila y la foto se recorta a esa misma proporción: las dos
	   piezas miden exactamente lo mismo. */
	body.jc-obra .e-con.jc-par > .e-con.jc-media {
		max-height: none;
		aspect-ratio: 16 / 9;
	}

	body.jc-obra .e-con.jc-par > .e-con.jc-figure {
		position: relative;
		aspect-ratio: 16 / 9;
		overflow: hidden;
	}

	body.jc-obra .jc-par > .jc-figure > .elementor-widget {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
	}

	body.jc-obra .jc-par > .jc-figure :is(.elementor-widget-container, .wd-images-gallery, .wd-grid-g, .wd-gallery-item, a) {
		display: block;
		width: 100%;
		max-width: none;
		height: 100%;
	}

	body.jc-obra .jc-par > .jc-figure img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
}

@media (max-width: 1024px) {
	body.jc-obra .e-con.jc-par > .e-con.jc-media {
		width: calc(100% + var(--jc-inset) * 2);
		max-width: none;
		margin-inline: calc(var(--jc-inset) * -1);
	}
}

/* Los enlaces del índice dejan el título bajo la cabecera fija. */
body.jc-obra--garden .e-con[id] {
	scroll-margin-top: 96px;
}

@media (prefers-reduced-motion: no-preference) {
	html:has(body.jc-obra--garden) {
		scroll-behavior: smooth;
	}
}

/* ------------------------------------------------------------------ pantallas medianas y estrechas */

@media (max-width: 1024px) {
	.jgm .jgm-index__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.jgm .jgm-flow__steps,
	.jgm .jgm-flow__facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: 30px;
	}

	.jgm-flow__track::before,
	.jgm-flow__spark {
		display: none;
	}

	.jgm .jgm-flow__steps li {
		padding-top: 22px;
		border-top: 1px solid var(--jgm-line);
	}

	.jgm .jgm-flow__steps li::before {
		top: -6px;
	}

	.jgm-map {
		grid-template-columns: minmax(0, 1fr);
	}

	.jgm-map__card {
		min-height: 0;
		order: 3;
	}

	.jgm .jgm-map__hint {
		order: 2;
	}
}

@media (max-width: 767px) {
	.jgm__stage {
		aspect-ratio: 4 / 5;
	}

	.jgm:is(.jgm--globo, .jgm--espiral, .jgm--rizoma) .jgm__stage {
		aspect-ratio: 1;
	}

	.jgm--telar .jgm__stage,
	.jgm--retrato .jgm__stage {
		aspect-ratio: 3 / 4;
	}

	.jgm--band .jgm__stage {
		aspect-ratio: 5 / 2;
	}

	.jgm .jgm__cap {
		flex-basis: 100%;
	}

	/* La cita arriba: abajo queda sitio para la instrucción y para dibujar. */
	.jgm .jgm-quote {
		justify-content: flex-start;
		padding-top: 34px;
	}

	.jgm .jgm__pieces {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Las tres fotografías, en una fila que se desliza. */
	.jgm-weave__row {
		grid-auto-columns: 72%;
		grid-auto-flow: column;
		grid-template-columns: none;
		margin-inline: calc(var(--jc-inset, 20px) * -1);
		padding-inline: var(--jc-inset, 20px);
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.jgm-weave__row::-webkit-scrollbar {
		display: none;
	}

	.jgm-weave__item {
		scroll-snap-align: center;
	}

	.jgm-table__row {
		grid-template-columns: minmax(0, 1fr);
		gap: 6px;
	}

	.jgm .jgm-table__row--head {
		display: none;
	}

	/* El mapa conserva un tamaño legible y se recorre con el dedo. */
	.jgm-map__svg {
		width: 860px;
		max-width: none;
	}

	.jgm-sheet {
		grid-template-columns: minmax(0, 1fr);
	}

	.jgm .jgm-sheet__sources ul {
		columns: 1;
	}
}

@media (max-width: 560px) {
	.jgm .jgm-flow__steps,
	.jgm .jgm-flow__facts {
		grid-template-columns: minmax(0, 1fr);
	}

	.jgm .jgm-flow__what,
	.jgm .jgm-flow__facts dd {
		max-width: none;
	}

	.jgm .jgm-sheet__dl > div {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.jgm-flow__spark,
	.jgm-map__svg.is-focus .jgm-map__edge.is-on {
		animation: none;
	}

	.jgm-flow__spark {
		display: none;
	}
}
