/*
Theme Name: JCDA-UAB Cold Case Repository
Theme URI: https://digitalrepository.info/
Description: Child theme for Twenty Twenty-Five, customized for the JCDA-UAB Cold Case Investigations and Prosecution Digital Repository.
Author: JCDA-UAB
Template: twentytwentyfive
Version: 1.7.0
Text Domain: jcda-uab-repository
*/

/* =========================================================
   JCDA-UAB Cold Case Investigations and Prosecution
   Digital Repository
   Parent theme: Twenty Twenty-Five
   Primary green: #1A5632
   ========================================================= */

:root {
	--repo-green: #1a5632;
	--repo-green-dark: #123d24;
	--repo-ink: #202722;
	--repo-muted: #5d665f;
	--repo-paper: #fbfaf6;
	--repo-white: #ffffff;
	--repo-border: #d7ddd8;
	--repo-soft: #eef2ee;
	--repo-focus: #d8a928;
}

/* ---------- Accessibility ---------- */

.repo-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999999;
	padding: 0.75rem 1rem;
	background: var(--repo-green-dark);
	color: var(--repo-white);
	font-weight: 700;
	text-decoration: none;
}

.repo-skip-link:focus {
	left: 1rem;
	top: 1rem;
	outline: 3px solid var(--repo-focus);
	outline-offset: 3px;
}

.repository-home a:focus-visible,
.repo-site-header a:focus-visible,
.repo-site-footer a:focus-visible,
.repository-home button:focus-visible,
.repository-home input:focus-visible {
	outline: 3px solid var(--repo-focus);
	outline-offset: 3px;
}

/* ---------- Global repository presentation ---------- */

html {
	scroll-behavior: smooth;
}

body {
	color: var(--repo-ink);
	background: var(--repo-white);
}

.repository-home {
	color: var(--repo-ink);
}

.repository-home a {
	text-underline-offset: 0.18em;
}

/* ---------- Header ---------- */

.repo-site-header {
	border-bottom: 1px solid var(--repo-border);
	background: var(--repo-white);
}

.repo-site-header-inner {
	max-width: 1180px;
	margin-inline: auto;
	padding: 1.25rem 1.5rem;
	gap: 2rem;
}

.repo-site-title {
	max-width: 760px;
}

.repo-site-title a {
	color: var(--repo-green);
	font-weight: 750;
	line-height: 1.25;
	text-decoration: none;
}

.repo-site-header .wp-block-navigation {
	font-size: 0.98rem;
	font-weight: 650;
}

.repo-site-header .wp-block-navigation-item__content {
	color: var(--repo-green-dark);
	text-decoration: none;
}

.repo-site-header .wp-block-navigation-item__content:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.repo-site-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--repo-paper);
	color: var(--repo-ink);
	padding: 2rem;
}

/* ---------- Homepage hero ---------- */

.repository-home-hero {
	background: var(--repo-paper);
	border-bottom: 1px solid var(--repo-border);
	padding-top: clamp(3rem, 7vw, 6rem);
	padding-bottom: clamp(3rem, 7vw, 5.5rem);
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

.repository-home-hero > * {
	max-width: 1180px;
	margin-left: auto;
	margin-right: auto;
}

.repository-home-hero .wp-block-heading {
	color: var(--repo-green);
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(2.35rem, 5vw, 4.6rem);
	font-weight: 600;
	letter-spacing: -0.025em;
	line-height: 1.05;
	max-width: 1050px;
	margin-left: 0;
	margin-bottom: 1.5rem;
}

.repository-home-intro {
	font-size: clamp(1.08rem, 1.8vw, 1.3rem);
	line-height: 1.7;
	max-width: 850px;
	color: var(--repo-ink);
	margin-left: 0;
}

/* ---------- Search ---------- */

.repository-search-shell {
	margin-top: 2.25rem;
	max-width: 820px;
	margin-left: 0;
}

.repository-search-label {
	display: block;
	color: var(--repo-green-dark);
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.09em;
	margin-bottom: 0.55rem;
	text-transform: uppercase;
}

.repository-search-shell .wp-block-search__inside-wrapper {
	gap: 0;
}

.repository-search-shell input[type="search"],
.repository-search-shell input[type="text"],
.repository-search-shell .wp-block-search__input {
	background: var(--repo-white);
	border: 2px solid var(--repo-green);
	border-radius: 0;
	color: var(--repo-ink);
	font-size: 1.05rem;
	min-height: 56px;
	padding: 0.8rem 1rem;
}

.repository-search-shell button,
.repository-search-shell .wp-block-search__button {
	background: var(--repo-green);
	border: 2px solid var(--repo-green);
	border-radius: 0;
	color: var(--repo-white);
	font-weight: 750;
	min-height: 56px;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

.repository-search-shell button:hover,
.repository-search-shell button:focus-visible,
.repository-search-shell .wp-block-search__button:hover,
.repository-search-shell .wp-block-search__button:focus-visible {
	background: var(--repo-green-dark);
	border-color: var(--repo-green-dark);
}

.repository-home-note {
	color: var(--repo-muted);
	font-size: 0.9rem;
	line-height: 1.6;
	margin-top: 0.75rem;
}

/* ---------- Homepage sections ---------- */

.repository-home-section {
	max-width: 1180px;
	margin-left: auto;
	margin-right: auto;
	padding-top: clamp(3rem, 6vw, 5rem);
	padding-bottom: clamp(3rem, 6vw, 5rem);
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

.repository-section-kicker {
	color: var(--repo-green);
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.11em;
	margin-bottom: 0.6rem;
	text-transform: uppercase;
}

.repository-section-title {
	color: var(--repo-green);
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(2rem, 3.5vw, 3rem);
	line-height: 1.15;
	margin-top: 0;
	margin-bottom: 2rem;
}

/* ---------- People cards ---------- */

.repository-people-grid {
	gap: 1.5rem;
	align-items: stretch;
}

.repository-people-grid > .wp-block-column {
	display: flex;
}

.repository-card {
	background: var(--repo-white);
	border: 1px solid var(--repo-border);
	border-top: 5px solid var(--repo-green);
	min-height: 100%;
	padding: clamp(1.5rem, 3vw, 2.25rem);
	width: 100%;
	box-sizing: border-box;
}

.repository-card-name {
	color: var(--repo-green);
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(1.55rem, 2.5vw, 2.15rem);
	line-height: 1.2;
	margin: 0 0 0.55rem;
}

.repository-card-date {
	color: var(--repo-muted);
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	margin-bottom: 1.25rem;
}

.repository-card-summary {
	line-height: 1.68;
	margin-bottom: 1.5rem;
}

.repository-card-link a {
	color: var(--repo-green);
	font-weight: 750;
	text-decoration-thickness: 2px;
}

/* ---------- About section ---------- */

.repository-about {
	max-width: none;
	background: var(--repo-soft);
	border-top: 1px solid var(--repo-border);
	border-bottom: 1px solid var(--repo-border);
}

.repository-about > * {
	max-width: 1180px;
	margin-left: auto;
	margin-right: auto;
}

.repository-about p:not(.repository-section-kicker):not(.repository-card-link) {
	line-height: 1.75;
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
}

/* ---------- Tainacan helpers ---------- */

/* Keep Tainacan content from collapsing into the parent theme's narrow blog column. */
.tainacan-item-single-page,
.tainacan-collection-header,
.tainacan-collection-page,
.tainacan-repository-page,
.tainacan-taxonomy-page,
.tainacan-items-list-container {
	max-width: 1180px;
	margin-inline: auto;
}

/* Repository links and common Tainacan actions */
[class*="tainacan"] a {
	text-underline-offset: 0.18em;
}

/* ---------- Footer ---------- */

.repo-site-footer {
	background: var(--repo-green-dark);
	color: var(--repo-white);
}

.repo-site-footer-inner {
	max-width: 1180px;
	margin-inline: auto;
	padding: 2.25rem 1.5rem;
	gap: 1.25rem;
}

.repo-site-footer p {
	margin-top: 0;
	margin-bottom: 0.65rem;
	line-height: 1.6;
}

.repo-site-footer a {
	color: var(--repo-white);
}

.repo-footer-title {
	font-weight: 750;
}

.repo-footer-funding {
	font-size: 0.88rem;
	max-width: 980px;
	opacity: 0.94;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
	.repo-site-header-inner {
		align-items: flex-start;
	}

	.repo-site-title {
		max-width: 620px;
	}
}

@media (max-width: 781px) {
	.repo-site-header-inner {
		padding: 1rem 1.25rem;
	}

	.repository-home-hero,
	.repository-home-section {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}

	.repository-search-shell .wp-block-search__inside-wrapper {
		display: flex;
		flex-direction: column;
		gap: 0.65rem;
	}

	.repository-search-shell .wp-block-search__button {
		margin-left: 0;
		width: 100%;
	}

	.repository-people-grid > .wp-block-column {
		display: block;
	}

	.repo-site-footer-inner {
		padding: 2rem 1.25rem;
	}
}

/* ---------- Print ---------- */

@media print {
	.repo-site-header nav,
	.repository-search-shell,
	.repo-site-footer {
		display: none !important;
	}

	a {
		color: #000 !important;
		text-decoration: underline;
	}

	.repository-card {
		break-inside: avoid;
	}
}


/* =========================================================
   v1.1 REFINEMENTS
   Typography, spacing, header/search prominence, and
   About-section alignment only. No structural changes.
   ========================================================= */

/* ---------- Overall type scale ---------- */

.repository-home {
	font-size: 1.0625rem; /* ~17px at a 16px browser base */
	line-height: 1.65;
}

.repository-home-intro {
	font-size: clamp(1.12rem, 1.9vw, 1.34rem);
	line-height: 1.72;
}

.repository-card-date {
	font-size: 0.98rem;
	line-height: 1.5;
	margin-bottom: 1.4rem;
}

.repository-card-summary {
	font-size: 1.02rem;
	line-height: 1.72;
	margin-bottom: 1.75rem;
}

.repository-card-link {
	font-size: 1rem;
}

.repository-section-kicker,
.repository-search-label {
	font-size: 0.875rem;
}

/* ---------- Header prominence ---------- */

.repo-site-header-inner {
	padding-top: 1.55rem;
	padding-bottom: 1.55rem;
}

.repo-site-title {
	max-width: 820px;
}

.repo-site-title,
.repo-site-title a {
	font-size: 1.125rem;
	line-height: 1.3;
}

.repo-site-header .wp-block-navigation {
	font-size: 0.95rem;
}

/* ---------- Hero spacing ---------- */

.repository-home-hero .wp-block-heading {
	margin-bottom: 1.65rem;
}

.repository-home-intro {
	margin-bottom: 0;
}

.repository-search-shell {
	margin-top: 2.7rem;
}

/* ---------- Search prominence ---------- */

.repository-search-label {
	letter-spacing: 0.1em;
	margin-bottom: 0.7rem;
}

.repository-search-shell input[type="search"],
.repository-search-shell input[type="text"],
.repository-search-shell .wp-block-search__input {
	font-size: 1.075rem;
	min-height: 62px;
	padding-top: 0.95rem;
	padding-bottom: 0.95rem;
}

.repository-search-shell button,
.repository-search-shell .wp-block-search__button {
	font-size: 1rem;
	min-height: 62px;
	padding-left: 1.7rem;
	padding-right: 1.7rem;
}

/* ---------- People-card spacing ---------- */

.repository-card {
	padding-top: clamp(1.75rem, 3vw, 2.4rem);
	padding-bottom: clamp(1.75rem, 3vw, 2.4rem);
}

.repository-card-name {
	margin-bottom: 0.7rem;
}

/* ---------- About-section alignment ---------- */

/*
 * Keep the About kicker, title, body copy, and link on one shared left edge.
 * The prior version allowed the body paragraph to center within a narrower
 * 900px measure, causing it to drift inward.
 */
.repository-about > * {
	width: 100%;
	max-width: 1180px;
	box-sizing: border-box;
	margin-left: auto;
	margin-right: auto;
}

.repository-about p:not(.repository-section-kicker):not(.repository-card-link) {
	max-width: 900px;
	margin-left: 0;
	margin-right: auto;
}

.repository-about .repository-section-kicker,
.repository-about .repository-section-title,
.repository-about .repository-card-link {
	margin-left: 0;
	margin-right: auto;
}

/* ---------- Mobile refinements ---------- */

@media (max-width: 781px) {
	.repo-site-header-inner {
		padding-top: 1.2rem;
		padding-bottom: 1.2rem;
	}

	.repo-site-title,
	.repo-site-title a {
		font-size: 1.02rem;
	}

	.repository-home {
		font-size: 1rem;
	}

	.repository-search-shell input[type="search"],
	.repository-search-shell input[type="text"],
	.repository-search-shell .wp-block-search__input,
	.repository-search-shell button,
	.repository-search-shell .wp-block-search__button {
		min-height: 58px;
	}
}


/* =========================================================
   v1.2 ALIGNMENT CORRECTION
   Keeps the About background full-width while aligning all
   About content with the People section's constrained column.
   ========================================================= */

.repository-about {
	max-width: none;
	width: 100%;
}

/*
 * Twenty Twenty-Five exposes the active constrained content width through
 * --wp--style--global--content-size. Using that same value here makes the
 * About section line up with the People section without hard-coding a
 * viewport-specific pixel offset.
 */
.repository-about > .repository-section-kicker,
.repository-about > .repository-section-title,
.repository-about > p,
.repository-about > .repository-card-link {
	width: calc(100% - 3rem);
	max-width: var(--wp--style--global--content-size, 780px);
	margin-left: auto !important;
	margin-right: auto !important;
	box-sizing: border-box;
}

/* Override the earlier v1.1 paragraph rule that pushed body copy left. */
.repository-about p:not(.repository-section-kicker):not(.repository-card-link) {
	max-width: var(--wp--style--global--content-size, 780px);
	margin-left: auto !important;
	margin-right: auto !important;
}

@media (max-width: 781px) {
	.repository-about > .repository-section-kicker,
	.repository-about > .repository-section-title,
	.repository-about > p,
	.repository-about > .repository-card-link {
		width: calc(100% - 2.5rem);
	}
}


/* =========================================================
   v1.3 PERSON RECORD TEMPLATE v1.0
   Reusable Tainacan-backed person landing page.
   ========================================================= */

.repo-person-page {
	color: var(--repo-ink);
}

.repo-person-hero {
	background: var(--repo-paper);
	border-bottom: 1px solid var(--repo-border);
	padding: clamp(3rem, 6vw, 5.5rem) 1.5rem;
}

.repo-person-hero-inner,
.repo-murder-book-inner {
	max-width: 1180px;
	margin-inline: auto;
}

.repo-person-kicker {
	color: var(--repo-green);
	font-size: 0.875rem;
	font-weight: 800;
	letter-spacing: 0.11em;
	margin: 0 0 0.7rem;
	text-transform: uppercase;
}

.repo-person-title {
	color: var(--repo-green);
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(2.7rem, 5vw, 4.8rem);
	font-weight: 600;
	letter-spacing: -0.025em;
	line-height: 1.04;
	margin: 0 0 1.5rem;
}

.repo-person-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 1.2rem 2.75rem;
	margin: 0 0 2.6rem;
}

.repo-person-fact {
	margin: 0;
}

.repo-person-fact dt {
	color: var(--repo-muted);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	margin-bottom: 0.2rem;
	text-transform: uppercase;
}

.repo-person-fact dd {
	font-size: 1.05rem;
	font-weight: 650;
	margin: 0;
}

.repo-person-narrative {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	gap: clamp(2rem, 5vw, 5rem);
	max-width: 1080px;
}

.repo-person-narrative h2 {
	color: var(--repo-green);
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(1.55rem, 2.5vw, 2.05rem);
	line-height: 1.2;
	margin: 0 0 0.9rem;
}

.repo-person-narrative p,
.repo-person-narrative li {
	font-size: 1.03rem;
	line-height: 1.75;
}

.repo-person-status {
	border-left: 4px solid var(--repo-green);
	background: var(--repo-white);
	margin-top: 2.5rem;
	max-width: 920px;
	padding: 1.1rem 1.25rem;
}

.repo-person-status strong {
	color: var(--repo-green-dark);
}

.repo-murder-book {
	padding: clamp(3.5rem, 7vw, 6rem) 1.5rem;
}

.repo-murder-book-heading {
	color: var(--repo-green);
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(2.25rem, 4vw, 3.5rem);
	line-height: 1.12;
	margin: 0 0 1rem;
}

.repo-murder-book-lede {
	font-size: 1.08rem;
	line-height: 1.7;
	max-width: 880px;
	margin-bottom: 2rem;
}

.repo-murder-index {
	border: 1px solid var(--repo-border);
	background: var(--repo-soft);
	margin: 2rem 0 3.25rem;
	padding: 1.25rem;
}

.repo-murder-index-title {
	color: var(--repo-green-dark);
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.09em;
	margin: 0 0 0.9rem;
	text-transform: uppercase;
}

.repo-murder-index-list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.5rem 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.repo-murder-index-list a {
	color: var(--repo-green-dark);
	font-size: 0.9rem;
	font-weight: 650;
	text-decoration-thickness: 1px;
}

.repo-murder-section {
	border-top: 1px solid var(--repo-border);
	padding: 2.4rem 0 2.6rem;
	scroll-margin-top: 2rem;
}

.repo-murder-section:last-child {
	border-bottom: 1px solid var(--repo-border);
}

.repo-murder-section-heading {
	display: flex;
	align-items: baseline;
	gap: 0.9rem;
	margin-bottom: 0.75rem;
}

.repo-murder-section-number {
	color: var(--repo-green);
	font-size: 0.9rem;
	font-weight: 850;
	letter-spacing: 0.08em;
	min-width: 2.2rem;
}

.repo-murder-section-title {
	color: var(--repo-green);
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(1.55rem, 2.5vw, 2.15rem);
	line-height: 1.2;
	margin: 0;
}

.repo-murder-section-intro {
	color: var(--repo-muted);
	font-size: 1rem;
	line-height: 1.7;
	max-width: 930px;
	margin: 0 0 1.35rem;
}

.repo-records-list {
	display: grid;
	gap: 0.85rem;
	max-width: 980px;
}

.repo-record-card {
	background: var(--repo-white);
	border: 1px solid var(--repo-border);
	border-left: 4px solid var(--repo-green);
	padding: 1.15rem 1.25rem;
}

.repo-record-card-title {
	color: var(--repo-green-dark);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.22rem;
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 0.45rem;
}

.repo-record-card-description {
	font-size: 0.98rem;
	line-height: 1.65;
	margin: 0 0 0.75rem;
	max-width: 820px;
}

.repo-record-card-link {
	margin: 0;
}

.repo-record-card-link a {
	color: var(--repo-green);
	font-weight: 750;
	text-decoration-thickness: 2px;
}

.repo-record-private {
	background: #f7f8f5;
	border-left-color: var(--repo-muted);
}

.repo-record-private .repo-record-card-title {
	color: var(--repo-ink);
}

.repo-access-label {
	display: inline-block;
	color: var(--repo-muted);
	font-size: 0.76rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	margin-bottom: 0.45rem;
	text-transform: uppercase;
}

.repo-empty-section {
	color: var(--repo-muted);
	font-style: italic;
	margin: 0;
}

.repo-person-admin-notice {
	background: #fff8dd;
	border: 1px solid #d8a928;
	color: #3f3512;
	margin: 1.25rem auto;
	max-width: 1180px;
	padding: 1rem 1.25rem;
}

.repo-person-admin-notice code {
	background: rgba(255,255,255,0.65);
}

@media (max-width: 900px) {
	.repo-person-narrative {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.repo-murder-index-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.repo-person-hero,
	.repo-murder-book {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}

	.repo-person-facts {
		display: grid;
		grid-template-columns: 1fr;
		gap: 0.85rem;
	}

	.repo-murder-index-list {
		grid-template-columns: 1fr;
	}

	.repo-murder-section-heading {
		align-items: flex-start;
	}

	.repo-murder-section-number {
		padding-top: 0.2rem;
	}
}


/* =========================================================
   v1.4 TAINACAN PEOPLE ITEM TEMPLATE
   The canonical Tainacan People item is now the Person page.
   ========================================================= */

.repo-person-place {
	margin-top: 2.6rem;
	max-width: 980px;
}

.repo-person-place h2 {
	color: var(--repo-green);
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(1.55rem, 2.5vw, 2.05rem);
	line-height: 1.2;
	margin: 0 0 1rem;
}

/*
 * Preserve Tainacan's Place of Death/geolocation rendering.
 * These rules only prevent wide embedded output from escaping the content
 * column; they do not replace or restyle the Tainacan map itself.
 */
.repo-person-place img,
.repo-person-place iframe,
.repo-person-place canvas,
.repo-person-place svg {
	max-width: 100%;
}

.repo-person-place .leaflet-container {
	max-width: 100%;
}

.repo-person-edit-link {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 1.5rem 2rem;
}

.repo-person-edit-link a {
	color: var(--repo-green);
	font-size: 0.9rem;
	font-weight: 700;
}

@media (max-width: 560px) {
	.repo-person-edit-link {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}
}


/* =========================================================
   v1.5 RELATED-ITEM RETRIEVAL / DIAGNOSTICS
   ========================================================= */

.repo-debug {
	background: #f7f2d8;
	border: 1px solid #b59b35;
	color: #332d17;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.84rem;
	line-height: 1.55;
	margin: 1rem auto 2rem;
	max-width: 1180px;
	overflow-wrap: anywhere;
	padding: 1rem 1.25rem;
}

.repo-debug strong {
	color: #1a5632;
}
