.hm-memento-documents {
	background: var(--hm-background);
	color: var(--hm-primary);
	padding: clamp(2rem, 5vw, 4rem) 0;
}
.hm-memento-documents__inner {
	box-sizing: border-box;
	width: 100%;
	max-width: 1170px;
	margin: 0 auto;
	padding: 0 clamp(1rem, 3vw, 2rem);
}
.hm-memento-documents h2,
.hm-memento-documents h3,
.hm-memento-documents p,
.hm-memento-documents a {
	color: var(--hm-primary);
	overflow-wrap: anywhere;
	text-transform: none;
}
.hm-memento-documents h2 { margin: 0 0 1.5rem; font-size: clamp(1.6rem, 3vw, 2.4rem); }
.hm-memento-documents h3 { margin: 0; font-size: 1.3rem; line-height: 1.35; }
.hm-memento-documents p { margin: .75rem 0; line-height: 1.6; }
.hm-memento-documents .hm-memento-documents__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem;
	list-style: none;
	/* The legacy theme list reset chains six :not() selectors. */
	padding: 0 !important;
	margin: 0 !important;
}
.hm-memento-documents .hm-memento-documents__item {
	display: flex;
	flex-direction: column;
	min-width: 0;
	box-sizing: border-box;
	margin: 0 !important;
	list-style: none;
	padding: 1.5rem;
	border: 1px solid var(--hm-accent3);
	border-top-width: 4px;
	border-radius: .5rem;
}
.hm-memento-documents__date { font-size: .875rem; }
.hm-memento-documents__link { align-self: flex-start; margin-top: auto; padding-top: 1rem; font-weight: 700; }
.hm-memento-documents a:hover { text-decoration-thickness: 2px; }
.hm-memento-documents a:focus-visible { outline: 2px solid var(--hm-accent3); outline-offset: 4px; }
@media (max-width: 767px) {
	.hm-memento-documents .hm-memento-documents__list { grid-template-columns: minmax(0, 1fr); }
	.hm-memento-documents .hm-memento-documents__item { padding: 1rem; }
}

/* Match the v2 reading column and the rhythm of its heritage details. */
.single-site-acf .site-editorial:has(+ .hm-memento-documents--compact) { margin-bottom: 1.25rem; }
.hm-memento-documents--compact { padding: 0 0 2.5rem; }
.hm-memento-documents--compact .hm-memento-documents__inner {
	width: calc(100% - 40px);
	max-width: 760px;
	padding: 1.25rem 0 0;
	border-top: 1px solid color-mix(in srgb, var(--hm-primary) 15%, var(--hm-background));
}
.hm-memento-documents--compact h2 { font-size: 1.375rem; margin-bottom: .75rem; }
.hm-memento-documents--compact .hm-memento-documents__list { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
.hm-memento-documents--compact .hm-memento-documents__item {
	display: block;
	padding: 0;
	border: 0;
	border-radius: 0;
}
.hm-memento-documents--compact .hm-memento-documents__row {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) auto;
	align-items: center;
	gap: 1rem;
	padding: .875rem .5rem;
	border-radius: .625rem;
	color: var(--hm-primary);
	text-decoration: none;
}
.hm-memento-documents--compact .hm-memento-documents__file-icon {
	display: grid;
	place-items: center;
	width: 40px;
	height: 44px;
	border-radius: .5rem;
	background: color-mix(in srgb, var(--hm-accent3) 12%, transparent);
	color: var(--hm-primary);
}
.hm-memento-documents--compact .hm-memento-documents__main { display: block; min-width: 0; }
.hm-memento-documents--compact .hm-memento-documents__name { display: block; font-size: 1rem; font-weight: 500; line-height: 1.5; }
.hm-memento-documents--compact .hm-memento-documents__meta { display: block; margin: .2rem 0 0; font-size: .8125rem; line-height: 1.5; }
.hm-memento-documents--compact .hm-memento-documents__action { display: inline-flex; align-items: center; gap: .5rem; }
.hm-memento-documents--compact .hm-memento-documents__format { font-size: .6875rem; letter-spacing: .04em; }
.hm-memento-documents--compact .hm-memento-documents__row:hover { background: color-mix(in srgb, var(--hm-accent3) 6%, transparent); }
.hm-memento-documents--compact .hm-memento-documents__row:hover .hm-memento-documents__name { text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 767px) {
	.hm-memento-documents--compact { padding-bottom: 2rem; }
	.hm-memento-documents--compact .hm-memento-documents__row { grid-template-columns: 32px minmax(0, 1fr) auto; gap: .625rem; padding: .75rem 0; }
	.hm-memento-documents--compact .hm-memento-documents__file-icon { width: 32px; height: 38px; }
	.hm-memento-documents--compact .hm-memento-documents__action { flex-direction: column; gap: .25rem; }
}

@media (max-width: 575.98px) {
	.hm-memento-documents--compact .hm-memento-documents__inner { width: calc(100% - 36px); }
}
