/* ============================================================
   PULSE-ART Observatory — result cards, demo-2 blog card style
   ------------------------------------------------------------
   Load AFTER css/resources-observatory.css. Everything here is
   scoped to .res-page so it only touches the Resources results
   grid and overrides the older side-by-side card layout.
   ============================================================ */

.res-page .res-results {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	padding-bottom: 20px;
	align-items: stretch;
}

/* ---------- the card ---------- */
.res-page .res-item {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: #fff;
	border: 0;
	border-radius: 0;
	padding: 17px 17px 15px;
	box-shadow: 0 2px 14px rgba(23, 25, 64, .07);
	transition: transform .25s ease, box-shadow .25s ease;
	overflow: hidden;
}

.res-page .res-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 28px rgba(23, 25, 64, .13);
}

/* accent colour per resource type, reused by the badge and the link */
/* Two colours per type: the plate uses the bright one, text on white uses an
   ink version solved to clear 5:1. The bright orange and gold were at 3.1 and
   3.3, which is what the contrast checker was flagging. */
.res-page .res-type-policy {
    --res-accent: #3a5fe0;
    --res-ink-accent: #2237b2;
}

.res-page .res-type-academic {
    --res-accent: #e2007a;
    --res-ink-accent: #a9005c;
}

.res-page .res-type-projects {
    --res-accent: #e85c1a;
    --res-ink-accent: #a83d0c;
}

.res-page .res-type-framework {
    --res-accent: #b58b00;
    --res-ink-accent: #7d6000;
}

.res-page .res-type-toolkit {
    --res-accent: #562db6;
    --res-ink-accent: #554477;
}

.res-page .res-type-other {
    --res-accent: #3c4e62;
    --res-ink-accent: #4b4f63;
}

/* ---------- cover ---------- */
.res-page .res-item-cover {
	position: relative;
	display: block;
	aspect-ratio: 2 / 1;
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	background: #eef0f4;
	text-decoration: none;
}

.res-page .res-cover {
	display: block;
	width: 100%;
	height: 100%;
}

/* The manifest picture covers the drawn fallback completely. If it 404s the
   script removes it and the drawing below shows instead. */
.res-page .res-cover-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .4s ease;
}

.res-page .res-item:hover .res-cover-img {
	transform: scale(1.035);
}

.res-page .res-cover-type,
.res-page .res-cover-pa {
	position: absolute;
	left: 0;
	bottom: 0;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	font-size: .7rem;
	font-weight: 800;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: #fff;
	background: var(--res-ink-accent);
}

.res-page .res-cover-type .res-i {
	width: 13px;
	height: 13px;
	stroke: currentColor;
	fill: none;
}

.res-page .res-cover-pa {
	left: auto;
	right: 0;
	bottom: 0;
	background: var(--res-navy);
	letter-spacing: .08em;
	font-size: .66rem;
	padding: 5px 10px;
}

/* ---------- body ---------- */
.res-page .res-item-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
	padding-top: 13px;
}

/* line one: what it is, then where it is from — the type leads */
.res-page .res-item-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	margin: 0 0 2px;
	font-size: .68rem;
	line-height: 1.45;
}



.res-page .res-item-place {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 4px;
	font-size: .78rem;
	color: #5d6172;
	font-weight: 600;
	letter-spacing: .01em;
}

.res-page .res-mi {
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
	opacity: .95;
}

/* line two: the document type, deliberately quiet */
/* the document type is a label, not a sentence */
.res-page .res-item-doc {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 9px;
	font-size: .78rem;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: .03em;
	color: #5f6474;
}

.res-page .res-item-doc .res-mi { width: 16px; height: 16px; opacity: .9; }

.res-page .res-item .res-tag .res-mi {
	width: 16px;
	height: 16px;
	opacity: .9;
	stroke-width: 1.7;
}

/* supplied artwork is filled, not stroked */
.res-page .res-mi-fill {
	fill: currentColor;
	stroke: none;
}

.res-page .res-meta-sep {
	display: inline-block;
	padding: 0 8px;
	opacity: .32;
}

.res-page .res-item-title a,
.res-page .res-item h3 a {
	color: inherit;
	text-decoration: none;
}

.res-page .res-item-title a:hover,
.res-page .res-item h3 a:hover {
	color: var(--res-ink-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.res-page .res-item-type {
	color: var(--res-ink-accent);
	font-weight: 800;
	font-size: .68rem;
	letter-spacing: .06em;
	text-transform: uppercase;
}

/* In the grid the plate carries the title, so the heading is kept for
   structure only. The list and the printout have no plate, and show it. */
.res-page .res-results:not(.is-list) .res-item-title {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	margin: -1px;
}

.res-page .res-item-desc {
	margin: 0 0 14px;
	font-size: .79rem;
	line-height: 1.52;
	color: #4f5364;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-bottom: 10px;
}

/* a record with no description of its own says who made it */
.res-page .res-item-who { color: #5b5f6f; font-style: italic; }

.res-page .res-item .res-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 10px;
}

/* the topic is the second thing people scan for, after the type */
.res-page .res-item .res-tag {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: color-mix(in srgb, var(--res-accent) 7%, #fff);
	border: 0;
	color: color-mix(in srgb, var(--res-ink-accent) 55%, #22242f);
	font-size: .76rem;
	font-weight: 600;
	padding: 5px 10px;
	border-radius: 2px;
}

.res-page .res-item .res-format { color: #5f6474; }

.res-page .res-item-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 11px;
	border-top: 1px solid var(--res-line-soft);
}

.res-page .res-item .res-open {
	color: var(--res-ink-accent);
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
}

.res-page .res-item .res-open:hover {
	color: var(--res-ink-accent);
	text-decoration: none;
}

.res-page .res-item .res-open .res-arrow {
	display: inline-block;
	transition: transform .18s ease;
}

.res-page .res-item:hover .res-open .res-arrow {
	transform: translateX(3px);
}

/* ---------- list view ----------
   No plate here. At this width the artwork carried nothing the row does not
   already say, so the type colour moves to a spine on the left edge and the
   whole row is given to the text. */
.res-page .res-results.is-list {
	grid-template-columns: 1fr;
	gap: 6px;
}

.res-page .res-results.is-list .res-item {
	display: block;
	padding: 12px 18px 12px 16px;
	border-left: 4px solid var(--res-accent);
	box-shadow: 0 1px 0 rgba(23, 25, 64, .07);
}

/* the running number is noise once the rows are this tight */
.res-page .res-results.is-list .res-item::before,
.res-page .res-item::before { content: none; }

.res-page .res-results.is-list .res-item-cover { display: none; }

.res-page .res-results.is-list .res-item-body {
	border-top: 0;
	margin-top: 0;
	padding-top: 0;
}




.res-page .res-results.is-list .res-item-title {
	margin: 0 0 3px;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.32;
	letter-spacing: -.012em;
	color: var(--res-ink);
	text-transform: none;
}

.res-page .res-results.is-list .res-item-meta {
	margin-bottom: 4px;
	font-size: .68rem;
}

.res-page .res-results.is-list .res-item-desc {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	max-width: none;
	margin-bottom: 6px;
	font-size: .84rem;
	line-height: 1.5;
}

.res-page .res-results.is-list .res-item .res-tags { margin-bottom: 6px; }

.res-page .res-results.is-list .res-item-foot {
	padding-top: 8px;
	border-top-color: #f0f0f4;
}

.res-page .res-results.is-list .res-item:hover {
	transform: none;
	box-shadow: 0 2px 12px rgba(23, 25, 64, .1);
}

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
	.res-page .res-results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
	/* a wide card would crop the plate hard, so give it more of its height */
	.res-page .res-item-cover { aspect-ratio: 16 / 9; }
}

@media (max-width: 680px) {
	.res-page .res-results { grid-template-columns: 1fr; gap: 16px; }
	.res-page .res-item { padding: 16px 16px 15px; }
	.res-page .res-item h3 { font-size: 1.06rem; }
}

@media (prefers-reduced-motion: reduce) {
	.res-page .res-item,
	.res-page .res-item .res-open .res-arrow { transition: none; }
	.res-page .res-item:hover { transform: none; }
}

/* ============================================================
   Search zone, lightened
   ------------------------------------------------------------
   The full-bleed navy panel with small bold capitals was tiring to read for
   long. Same layout, same brand colours, but the field is now light and the
   type is bigger and less shouty. Loaded after the explore stylesheet, so
   these simply override it.
   ============================================================ */
.res-x .x-hero {
	background: var(--res-navy, #171940);
	color: #fff;
	border-bottom: 0;
}

.res-x .x-hero h1 {
	color: #fff;
	border-bottom-color: rgba(255, 255, 255, .22);
	font-size: 2.05rem;
	padding-bottom: 10px;
}

.res-x .x-hero-inner { padding-top: 34px; padding-bottom: 26px; }

.res-x .x-hero .x-lead { margin-bottom: 14px; }

.res-x .x-hero .x-eyebrow {
	color: #ff8ec8;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .1em;
}

.res-x .x-hero .x-lead,
.res-x .x-hero p {
	color: rgba(255, 255, 255, .84);
	font-size: 1rem;
}

.res-x .x-hero .x-stat strong { color: #fff; }

.res-x .x-hero .x-stat span {
	color: rgba(255, 255, 255, .6);
	font-size: .76rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: none;
}

/* The filters are the working part of this zone, so they are built to look
   operable: a coloured edge that says "this opens", a caret in brand colour,
   and a label heavy enough to read against the navy around it. */
.res-x .x-hero .x-fbtn {
	position: relative;
	background: #fff;
	border: 1px solid #fff;
	border-bottom: 3px solid #c7cbd8;
	color: var(--res-navy, #171940);
	font-size: 1rem;
	font-weight: 700;
	padding: 13px 15px;
	box-shadow: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.res-x .x-hero .x-fbtn:hover {
	background: #fff;
	border-bottom-color: var(--res-magenta, #d81f78);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
}

.res-x .x-hero .x-fbtn[aria-expanded="true"] {
	background: #fff;
	border-color: #fff;
	border-bottom-color: var(--res-magenta, #d81f78);
	box-shadow: 0 0 0 2px var(--res-magenta, #d81f78);
	color: var(--res-navy, #171940);
}

.res-x .x-hero .x-fbtn .x-caret {
	opacity: 1;
	color: var(--res-magenta, #d81f78);
}

/* the count badge on an active filter */
.res-x .x-hero .x-fbtn .x-count {
	background: var(--res-magenta, #d81f78);
	color: #fff;
	font-weight: 800;
}

.res-x .x-hero .res-keyword {
	border: 1px solid #fff;
	box-shadow: none;
}

.res-x .x-hero .res-keyword:focus-within {
	border-color: var(--res-magenta, #d81f78);
	box-shadow: 0 0 0 3px rgba(216, 31, 120, .35);
}

.res-x .x-hero .res-manual-btn {
	background-color: #fff;
	border-color: #fff;
	color: var(--res-navy, #171940);
}

.res-x .x-hero .x-shapes { opacity: 1; }

/* "How to search" still carried its on-dark treatment: white text on a
   transparent button, which vanished the moment the hero turned light. */
.res-x .res-help-on-dark .res-help-btn {
	background: #fff;
	border-color: #fff;
	color: var(--res-navy, #171940);
}

.res-x .res-help-on-dark .res-help-btn:hover {
	background: #fff;
	border-color: #fff;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, .22);
	color: var(--res-navy, #171940);
}

.res-x .res-help-on-dark .res-help-btn[aria-expanded="true"] {
	background: #fff;
	border-color: var(--res-magenta, #d81f78);
	box-shadow: 0 0 0 1px var(--res-magenta, #d81f78);
	color: var(--res-navy, #171940);
}

/* ============================================================
   Print
   ------------------------------------------------------------
   A printed sheet leaves the screen behind, so each item carries the same
   reference string the record page and the PDF report use.
   ============================================================ */
.res-page .res-cite { display: none; }

/* a card with no description of its own shows its reference instead */
.res-page .res-item.is-nodesc .res-cite { display: none; }

.res-page .res-item.is-nodesc .res-cite-unused {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0 0 14px;
	font-size: .82rem;
	line-height: 1.55;
	color: #5d6172;
}

.res-page .res-item.is-nodesc .res-cite em { font-style: italic; }

.res-page .res-results.is-list .res-item.is-nodesc .res-cite {
	margin-bottom: 6px;
	font-size: .8rem;
}

@media print {
	.res-page .res-results {
		display: block;
		max-width: none;
	}

	.res-page .res-item {
		display: block;
		break-inside: avoid;
		page-break-inside: avoid;
		box-shadow: none;
		border: 0;
		border-left: 4px solid #999;
		padding: 0 0 0 12px;
		margin: 0 0 16px;
	}

	.res-page .res-item-cover,
	.res-page .res-item-foot,
	.res-page .res-item .res-tags { display: none; }

	.res-page .res-item-body { padding-top: 0; }

	.res-page .res-item-title {
		margin: 0 0 4px;
		font-size: 12.5pt;
		font-weight: 700;
		color: #000;
	}

	.res-page .res-item-meta { color: #444; font-size: 8pt; margin-bottom: 4px; }

	.res-page .res-item-desc {
		display: block;
		-webkit-line-clamp: none;
		line-clamp: none;
		overflow: visible;
		color: #222;
		font-size: 9.5pt;
		margin-bottom: 5px;
	}

	.res-page .res-cite {
		display: block;
		margin: 0;
		padding-left: 18px;
		text-indent: -18px;
		font-size: 8.5pt;
		line-height: 1.45;
		color: #333;
	}

	.res-page .res-cite em { font-style: italic; }
}

/* ---------- the field behind the cards ----------
   The explore stylesheet paints #eef0f5 behind the grid, which reads as a
   slab closing the cards in. Lifted to near-white so the page has air. */
.res-x .res-results,
.res-x .res-more {
	background: #f8f8fb;
}

.res-x .res-results { padding: 14px; }
