/**
 * Publication lists.
 *
 * Written against Kadence's global palette variables so the lists inherit the site's
 * typography and colour rather than fighting it. Fallbacks match the palette
 * documented in PRODUCT.md (#2B6CB0 primary, slate greys) so the block still looks
 * right if it is ever rendered outside the Kadence theme.
 */

.eqipd-pubs__heading {
	margin: 2.5em 0 0.75em;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var( --global-palette4, #4a5568 );
}

.eqipd-pubs__heading:first-child {
	margin-top: 0;
}

.eqipd-pubs__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.eqipd-pub {
	margin: 0;
	padding: 1em 0;
	border-bottom: 1px solid var( --global-palette7, #e2e8f0 );
}

.eqipd-pubs__list > .eqipd-pub:last-child {
	border-bottom: 0;
}

.eqipd-pub__title {
	display: block;
	font-weight: 600;
	line-height: 1.45;
	text-decoration: none;
	color: var( --global-palette3, #1a202c );
}

a.eqipd-pub__title:hover,
a.eqipd-pub__title:focus {
	color: var( --global-palette1, #2b6cb0 );
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

a.eqipd-pub__title:focus-visible {
	outline: 2px solid var( --global-palette1, #2b6cb0 );
	outline-offset: 3px;
	border-radius: 2px;
}

.eqipd-pub__source {
	display: block;
	margin-top: 0.3em;
	font-size: 0.9em;
	color: var( --global-palette5, #718096 );
}

.eqipd-pub__journal {
	font-style: italic;
}

/* Chapters nested under the book they belong to. */
.eqipd-pubs__children {
	margin: 0.85em 0 0.15em;
	padding: 0 0 0 1.25em;
	list-style: none;
	border-left: 2px solid var( --global-palette7, #e2e8f0 );
}

.eqipd-pubs__children .eqipd-pub {
	padding: 0.5em 0;
	border-bottom: 0;
}

.eqipd-pubs__children .eqipd-pub__title {
	font-weight: 500;
	font-size: 0.97em;
}

.eqipd-pubs__placeholder {
	padding: 1em;
	border: 1px dashed var( --global-palette6, #a0aec0 );
	color: var( --global-palette5, #718096 );
}

/* Hub cards */
.eqipd-pubs-index {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 210px, 1fr ) );
	gap: 1rem;
	margin: 1.5em 0;
}

.eqipd-pubs-index__card {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	padding: 1.4rem 1.25rem;
	text-decoration: none;
	border: 1px solid var( --global-palette7, #e2e8f0 );
	border-radius: 6px;
	background: var( --global-palette9, #fff );
	transition: border-color 0.15s ease, transform 0.15s ease;
}

a.eqipd-pubs-index__card:hover,
a.eqipd-pubs-index__card:focus {
	border-color: var( --global-palette1, #2b6cb0 );
	transform: translateY( -2px );
}

a.eqipd-pubs-index__card:focus-visible {
	outline: 2px solid var( --global-palette1, #2b6cb0 );
	outline-offset: 3px;
}

.eqipd-pubs-index__count {
	font-size: 2.2rem;
	font-weight: 700;
	line-height: 1;
	color: var( --global-palette1, #2b6cb0 );
}

.eqipd-pubs-index__label {
	font-weight: 600;
	color: var( --global-palette3, #1a202c );
}

.eqipd-pubs-index__desc {
	font-size: 0.9em;
	color: var( --global-palette5, #718096 );
}

@media ( prefers-reduced-motion: reduce ) {
	.eqipd-pubs-index__card {
		transition: none;
	}

	a.eqipd-pubs-index__card:hover,
	a.eqipd-pubs-index__card:focus {
		transform: none;
	}
}

/* Single-page variant (v2): stacked sections behind anchor tiles. */

@media ( prefers-reduced-motion: no-preference ) {
	html {
		scroll-behavior: smooth;
	}
}

.eqipd-pubs-section {
	margin-top: 3.5rem;
	padding-top: 2.5rem;
	border-top: 2px solid var( --global-palette7, #e2e8f0 );
}

/*
 * Anchor clearance under the sticky header is global now: scroll-padding-top on
 * html in goeqipd-site-tweaks, plus the kadence_scroll_to_id_additional_offset
 * filter for the clicks Kadence's JS intercepts. A scroll-margin-top here would
 * stack on top of that scroll-padding and double the offset.
 */

.eqipd-pubs-section__top {
	margin-top: 1.5rem;
	font-size: 0.9em;
}

.eqipd-pubs-section__top a {
	color: var( --global-palette5, #718096 );
	text-decoration: none;
}

.eqipd-pubs-section__top a:hover,
.eqipd-pubs-section__top a:focus {
	color: var( --global-palette1, #2b6cb0 );
	text-decoration: underline;
}
