/**
 * Blogs — "Views and Voices": the listing, a category, and one piece.
 *
 * Prefixed bl-, built on the Our Work kit (our-work.css). Where News & Updates
 * reads like a newsroom, this reads like an essay: one centred column, a
 * narrower measure, larger type and a name against every piece.
 */

.bl {
	--bl-ink: var(--ow-ink);
	--bl-accent: #571c91;
	--bl-gold: #b8860b;
	--bl-measure: 720px;
}

.bl .visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* =========================================================
   Hero
   ========================================================= */
.bl-hero {
	padding: 38px 0 30px;
	background:
		radial-gradient(900px 300px at 15% -20%, rgba(184, 134, 11, .10), transparent 65%),
		linear-gradient(180deg, #faf7fd 0%, #fff 100%);
	text-align: center;
}
.bl-hero .ow-crumbs { justify-content: center; }
.bl-hero .ow-h1 { margin: 6px 0 12px; }
.bl .bl-hero__lead {
	max-width: 620px;
	margin: 0 auto;
	color: var(--ow-body);
	font-size: 17px;
	font-style: italic;
	line-height: 1.7;
}

.bl-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }
.bl-chip {
	display: inline-flex;
	gap: 7px;
	align-items: center;
	padding: 8px 15px;
	border: 1px solid var(--ow-line);
	border-radius: 999px;
	background: #fff;
	color: var(--ow-body);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.bl-chip span { color: var(--ow-muted); font-size: 12px; }
.bl-chip:hover { border-color: var(--bl-accent); color: var(--bl-accent); }
.bl-chip.is-active { border-color: var(--bl-accent); background: var(--bl-accent); color: #fff; }
.bl-chip.is-active span { color: rgba(255, 255, 255, .75); }

/* =========================================================
   The latest piece, opened wide
   ========================================================= */
.bl-lead-wrap { padding: 30px 0 6px; }
.bl-lead {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: clamp(20px, 3vw, 38px);
	align-items: center;
	padding: clamp(18px, 2.4vw, 26px);
	border: 1px solid var(--ow-line);
	border-radius: var(--ow-radius);
	background: linear-gradient(180deg, #fff 0%, var(--ow-tint) 100%);
	box-shadow: var(--ow-shadow);
}
.bl-lead__media {
	display: block;
	overflow: hidden;
	border-radius: 18px;
	aspect-ratio: 4 / 3;
	background: var(--ow-soft);
}
.bl-lead__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.bl-lead:hover .bl-lead__media img { transform: scale(1.03); }
.bl-lead__flags { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 14px; }
.bl-flag {
	padding: 4px 11px;
	border-radius: 999px;
	background: rgba(184, 134, 11, .14);
	color: #7a5a06;
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
}
.bl-lead__title { margin: 0 0 12px; font-size: clamp(24px, 2.5vw, 34px); font-weight: 800; line-height: 1.22; }
.bl .bl-lead__title a { color: var(--bl-ink); text-decoration: none; }
.bl .bl-lead__title a:hover { color: var(--bl-accent); }
.bl .bl-lead__summary { margin: 0 0 18px; color: var(--ow-body); font-size: 16.5px; line-height: 1.75; }
.bl-lead__more { margin-top: 16px; }

/* =========================================================
   The byline
   ========================================================= */
.bl-by { display: flex; gap: 12px; align-items: center; margin: 0; }
.bl-by--center { justify-content: center; text-align: left; }
.bl-by__badge {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--bl-accent), #8b4fc0);
	color: #fff;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: .02em;
}
.bl-by--lg .bl-by__badge { width: 46px; height: 46px; flex-basis: 46px; font-size: 16px; }
.bl-by__text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.bl-by__name { color: var(--bl-ink); font-size: 14.5px; font-weight: 700; }
.bl-by--lg .bl-by__name { font-size: 16px; }
.bl-by__meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--ow-muted); font-size: 13px; }

/* =========================================================
   Cards
   ========================================================= */
.bl-list { padding: 34px 0 70px; }
.bl-list__head { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.bl-list__head .ow-h2 { margin: 0; }

.bl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

.bl-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--ow-line);
	border-radius: 20px;
	background: #fff;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.bl-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--bl-accent) 30%, #fff); box-shadow: var(--ow-shadow); }
.bl-card__media { display: block; overflow: hidden; aspect-ratio: 16 / 10; background: var(--ow-soft); }
.bl-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.bl-card:hover .bl-card__media img { transform: scale(1.04); }
.bl-card__placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--bl-accent); font-size: 30px; opacity: .45; }
.bl-card__body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 20px; }
.bl-card__title { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.35; }
.bl .bl-card__title a { color: var(--bl-ink); text-decoration: none; }
.bl .bl-card__title a:hover { color: var(--bl-accent); }
.bl .bl-card__summary { flex: 1; margin: 0; color: var(--ow-body); font-size: 14.5px; line-height: 1.7; }

.bl-tag {
	align-self: flex-start;
	padding: 4px 11px;
	border-radius: 999px;
	background: var(--ow-accent-soft);
	color: var(--bl-accent);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	text-decoration: none;
	text-transform: uppercase;
}
.bl a.bl-tag:hover { background: var(--bl-accent); color: #fff; }
.bl-tag--lg { padding: 6px 14px; font-size: 12.5px; }

.bl-pagination { margin-top: 40px; }
.bl-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.bl-pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border: 1px solid var(--ow-line);
	border-radius: 12px;
	background: #fff;
	color: var(--ow-body);
	font-weight: 700;
	text-decoration: none;
}
.bl-pagination .page-numbers:hover { border-color: var(--bl-accent); color: var(--bl-accent); }
.bl-pagination .page-numbers.current { border-color: var(--bl-accent); background: var(--bl-accent); color: #fff; }
.bl-pagination .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.bl-empty {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: center;
	padding: 64px 24px;
	border: 1px dashed var(--ow-line);
	border-radius: 24px;
	text-align: center;
}
.bl-empty > i { color: var(--bl-accent); font-size: 42px; }
.bl-empty h2 { margin: 6px 0 0; color: var(--bl-ink); font-size: 23px; font-weight: 800; }
.bl .bl-empty p { margin: 0 0 12px; color: var(--ow-muted); }

/* =========================================================
   One piece
   ========================================================= */
.bl-progress { position: fixed; top: 0; left: 0; z-index: 1100; width: 100%; height: 3px; background: transparent; pointer-events: none; }
.bl-progress span {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, var(--bl-accent), var(--bl-gold));
	transform: scaleX(var(--p, 0));
	transform-origin: 0 50%;
}

.bl-piece__head { padding: 36px 0 26px; background: linear-gradient(180deg, #faf7fd 0%, #fff 100%); }
.bl-piece__inner { max-width: 780px; margin: 14px auto 0; text-align: center; }
.bl-piece__title { margin: 14px 0 14px; color: var(--bl-ink); font-size: clamp(27px, 3.6vw, 44px); font-weight: 800; line-height: 1.2; }
.bl .bl-piece__standfirst { max-width: var(--bl-measure); margin: 0 auto 20px; color: var(--ow-body); font-size: 18px; font-style: italic; line-height: 1.75; }

.bl-cover { max-width: 980px; margin: 0 auto 34px; }
.bl-cover img { width: 100%; height: auto; border-radius: var(--ow-radius); }
.bl-cover figcaption { margin-top: 10px; color: var(--ow-muted); font-size: 13.5px; text-align: center; }

/* ---- The writing itself, from the block editor ---- */
.bl-prose {
	max-width: var(--bl-measure);
	margin: 0 auto;
	color: #39334d;
	font-size: 18px;
	line-height: 1.9;
	overflow-wrap: break-word;
}
.bl-prose > * { margin-top: 0; margin-bottom: 1.4em; }
.bl-prose > :last-child { margin-bottom: 0; }
.bl .bl-prose p { font-size: inherit; line-height: inherit; text-align: left; }
.bl .bl-prose > p:first-child { color: var(--bl-ink); font-size: 1.1em; }

.bl-prose h2,
.bl-prose h3,
.bl-prose h4 { margin-top: 1.9em; margin-bottom: .55em; color: var(--bl-ink); font-weight: 800; line-height: 1.3; }
.bl-prose h2 { font-size: 1.45em; }
.bl-prose h3 { font-size: 1.2em; color: var(--bl-accent); }
.bl-prose h4 { font-size: 1.05em; }
/* Headings pasted in often arrive wrapped in bold; they keep the heading's colour. */
.bl-prose :is(h1, h2, h3, h4, h5, h6) :is(strong, b) { color: inherit; font-weight: inherit; }

.bl-prose strong, .bl-prose b { color: var(--bl-ink); font-weight: 700; }
.bl-prose a { color: var(--bl-accent); text-underline-offset: 3px; }

.bl-prose ul, .bl-prose ol { padding-left: 1.3em; }
.bl-prose li { margin-bottom: .55em; }
.bl-prose ul li::marker { color: var(--bl-gold); }
.bl-prose ol li::marker { color: var(--bl-accent); font-weight: 700; }

.bl-prose blockquote {
	margin-inline: 0;
	padding: 4px 0 4px 26px;
	border-left: 3px solid var(--bl-gold);
	color: var(--bl-ink);
	font-size: 1.12em;
	font-style: italic;
	line-height: 1.7;
}
.bl-prose blockquote cite { display: block; margin-top: 10px; color: var(--ow-muted); font-size: .8em; font-style: normal; font-weight: 700; }

.bl-prose img { height: auto; border-radius: 16px; }
.bl-prose figure { margin-inline: 0; }
.bl-prose figcaption,
.bl-prose .wp-element-caption { margin-top: 9px; color: var(--ow-muted); font-size: 13.5px; text-align: center; }

.bl-prose .alignwide { width: min(940px, 92vw); margin-inline: calc(50% - min(470px, 46vw)); }
.bl-prose .alignfull { width: 100vw; margin-inline: calc(50% - 50vw); }
.bl-prose .alignfull img { border-radius: 0; }
.bl-prose .aligncenter { margin-inline: auto; text-align: center; }

/* WordPress sizes gallery tiles from this variable, so the gap and the
   variable must agree; the extra class outranks the inline value. */
.bl-prose .wp-block-gallery.has-nested-images { --wp--style--unstable-gallery-gap: 12px; gap: 12px; }
.bl-prose .wp-block-gallery figure.wp-block-image { min-width: 0; }
.bl-prose .wp-block-gallery .bl-zoom { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.bl-prose .wp-block-gallery .wp-block-image img { width: 100%; }

.bl-prose .wp-block-embed__wrapper iframe,
.bl-prose iframe { max-width: 100%; border: 0; border-radius: 16px; }
.bl-prose table { width: 100%; border-collapse: collapse; font-size: .92em; }
.bl-prose th, .bl-prose td { padding: 10px 12px; border: 1px solid var(--ow-line); text-align: left; }
.bl-prose th { background: var(--ow-tint); color: var(--bl-ink); }
.bl-prose hr,
.bl-prose .wp-block-separator { max-width: 120px; margin: 2.4em auto; border: 0; border-top: 2px solid var(--ow-line); }

.bl-zoom { display: block; cursor: zoom-in; }

/* ---- After the piece ---- */
.bl-foot { max-width: var(--bl-measure); margin: 46px auto 0; padding-top: 24px; border-top: 1px solid var(--ow-line); }
.bl-foot__share { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.bl-foot__share > span { color: var(--bl-ink); font-size: 16px; font-weight: 700; }
.bl-foot__share > div { display: flex; flex-wrap: wrap; gap: 8px; }
.bl-share {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--ow-line);
	border-radius: 50%;
	background: #fff;
	color: var(--ow-body);
	font-size: 16px;
	cursor: pointer;
	transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.bl a.bl-share { text-decoration: none; }
.bl-share:hover { border-color: var(--bl-accent); background: var(--bl-accent); color: #fff; }
.bl-share.is-copied { border-color: #059669; background: #059669; color: #fff; }

.bl-foot__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.bl .bl-foot__tags a { padding: 5px 12px; border-radius: 999px; background: var(--ow-tint); color: var(--ow-body); font-size: 13.5px; text-decoration: none; }
.bl-foot__back { display: inline-flex; margin-top: 22px; }

.bl-related { padding: 58px 0 70px; background: linear-gradient(180deg, #fff 0%, var(--ow-tint) 100%); }

/* =========================================================
   Narrow screens
   ========================================================= */
@media (max-width: 991.98px) {
	.bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bl-lead { grid-template-columns: minmax(0, 1fr); }
	.bl-lead__media { aspect-ratio: 16 / 9; }
}

@media (max-width: 575.98px) {
	.bl-grid { grid-template-columns: minmax(0, 1fr); }
	.bl-hero { padding-top: 26px; }
	.bl-prose { font-size: 17px; }
	.bl-piece__inner { margin-top: 8px; }
	.bl-by--center { justify-content: flex-start; }
	.bl-piece__inner { text-align: left; }
	.bl-hero, .bl-hero .ow-crumbs { text-align: left; justify-content: flex-start; }
	.bl .bl-hero__lead { margin-inline: 0; }
	.bl-chips { justify-content: flex-start; }
	.bl-foot__share { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
	.bl-card, .bl-card__media img, .bl-lead__media img { transition: none; }
}
