/*
 * Site map.
 *
 * The page was a heading and 3,149 bytes of Elementor data, so it rendered 21
 * characters — and it is linked from the footer of every page, which makes it
 * where somebody goes when the navigation has not helped them.
 *
 * Every custom property carries a fallback. The plugin owns this markup
 * (ADR-001) and has to keep looking like itself under a theme that has never
 * heard of these tokens.
 */

/*
 * Columns, because this is a reference to scan rather than prose to read. Six
 * sections down a single column is several screens of a page whose whole
 * purpose is showing the shape of the site at once.
 */
.jmns-sitemap {
	columns: 3 18rem;
	column-gap: var(--wp--preset--spacing--60, 2.5rem);
	margin-block-start: var(--wp--preset--spacing--40, 1.5rem);
}

/* So a section never splits across two columns with its heading stranded at
   the foot of one. */
.jmns-sitemap__section {
	break-inside: avoid;
	margin-block-end: var(--wp--preset--spacing--50, 2rem);
}

.jmns-sitemap__title {
	margin-block: 0 var(--wp--preset--spacing--20, 0.5rem);
	padding-block-end: var(--wp--preset--spacing--10, 0.25rem);
	border-block-end: 2px solid var(--wp--preset--color--interactive, #245746);
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-size: var(--wp--preset--font-size--medium, 1rem);
	font-weight: 700;
	line-height: 1.3;
}

.jmns-sitemap__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.jmns-sitemap__item {
	margin: 0;
}

/*
 * 44px of target on every row. A site map is a page of nothing but links, and
 * it is reached most often by somebody who has already failed to find what they
 * wanted — the one page where a cramped hit area costs the most (SC 2.5.8).
 */
.jmns-sitemap a {
	display: block;
	min-block-size: 44px;
	padding-block: var(--wp--preset--spacing--10, 0.4rem);
	color: var(--wp--preset--color--text-primary, #1F2925);
	line-height: 1.4;
	text-decoration: none;
}

/* The section heading is already a heading; it does not need the row height. */
.jmns-sitemap__title a {
	min-block-size: 0;
	padding-block: 0;
	color: inherit;
}

.jmns-sitemap a:hover,
.jmns-sitemap a:focus-visible {
	color: var(--wp--preset--color--interactive-hover, #173D32);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* The mark on a link that leaves for another system. Paired with
   screen-reader text in the markup, so it never carries the meaning alone. */
.jmns-sitemap__external {
	margin-inline-start: 0.35em;
	color: var(--wp--preset--color--text-secondary, #5E6D63);
	font-size: 0.85em;
}

@media (max-width: 48rem) {
	/* One column. Two 18rem columns do not fit, and a map that reflows
	   mid-section is worse than a long one. */
	.jmns-sitemap {
		columns: 1;
	}
}
