/*
 * Image figures + image-link affordance.
 *
 * Two concerns:
 *   1. Strip WP's default 1px <figure> border that read as "JC photo
 *      has a black frame around it."
 *   2. Image-only links must NOT inherit the body's text-link underline,
 *      because the underline reads as a stray rule under the photo and
 *      the box-outline reads as a focus error.
 */

/* ---------- Figure baseline ---------- */
.entry-content .wp-block-image {
	margin: 0;
}

.entry-content .wp-block-image figure {
	margin: 0;
	padding: 0;
	border: 0;
}

.entry-content .wp-block-image img {
	display: block;
	max-width: 100%;
	height: auto;
}

/* ---------- Image-only links: no underline, no border, no outline ring ---------- *
 * Targets <a> whose only content is an <img> or <figure>. Pairs with the
 * :has(img/figure) exclusion in 20-typography.css for the text-link rule.
 */
.entry-content a:has(> img),
.entry-content a:has(> figure),
.entry-content a:has(> .wp-block-post-featured-image) {
	color: inherit;
	text-decoration: none;
	border: 0;
	display: block;
	line-height: 0;
}

.entry-content a:has(> img):focus-visible,
.entry-content a:has(> figure):focus-visible {
	outline: 2px solid #15526F;
	outline-offset: 4px;
	border-radius: var(--isjac-radius-md);
}

/* Featured-image links inside cards — same rule, applied via card scope. */
.wp-block-post-featured-image a {
	display: block;
	line-height: 0;
	border: 0;
	text-decoration: none;
}
