/**
 * T6 — the Insights hub.
 *
 * Facet rail left on desktop, collapsing to a stack below 900px. Result count
 * and applied filters above the list. Cards single-column on mobile, two above
 * 900px. `07-templates.md` T6.
 */

.pem-hub-insights__body {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: start;
}

@media (min-width: 56.25rem) {
	.pem-hub-insights__body { grid-template-columns: 15rem 1fr; }
	.pem-hub-insights__facets { position: sticky; top: 1.5rem; }
}

/* ---------------------------------------------------------------- search -- */

.pem-hub-insights__search { margin: 0 0 1.75rem; max-width: 34rem; }

.pem-hub-insights__search label {
	display: block;
	font-weight: 600;
	margin-bottom: .35rem;
}

.pem-hub-insights__search-row { display: flex; gap: .5rem; }
.pem-hub-insights__search input { flex: 1; min-width: 0; padding: .5rem .7rem; }

/* Said plainly, because a reader who assumes this is a site search and gets
   nothing concludes the site has nothing. */
.pem-hub-insights__scope {
	margin: .4rem 0 0;
	font-size: var(--step--2, .78rem);
	color: var(--ink-2, #4a5058);
}

/* ---------------------------------------------------------------- facets -- */

.pem-hub-insights__facets-title {
	font-size: var(--step--1, .875rem);
	text-transform: uppercase;
	letter-spacing: .08em;
	margin: 0 0 .75rem;
	padding-bottom: .4rem;
	border-bottom: 2px solid var(--ink, #16191d);
}

.pem-facet { border: 0; padding: 0; margin: 0 0 1.25rem; }

.pem-facet legend {
	font-size: var(--step--2, .78rem);
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--ink-2, #4a5058);
	font-weight: 600;
	padding: 0;
	margin-bottom: .3rem;
}

.pem-facet ul { list-style: none; margin: 0; padding: 0; }

.pem-facet__option {
	display: flex;
	justify-content: space-between;
	gap: .5rem;
	padding: .25rem .4rem;
	text-decoration: none;
	color: inherit;
	border-radius: 3px;
	font-size: var(--step--1, .875rem);
}

.pem-facet__option:hover { background: var(--ground-2, #f4f6f8); }

.pem-facet__option.is-on {
	background: var(--accent, #0b4f6c);
	color: #fff;
	font-weight: 600;
}

.pem-facet__count { font-variant-numeric: tabular-nums; opacity: .7; }

/* --------------------------------------------------------------- results -- */

/* The single clearest signal that a filter did something, so it is not
   whispered. */
.pem-hub-insights__count {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	margin: 0 0 .6rem;
}

.pem-hub-insights__applied {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
}

.pem-hub-insights__applied a {
	display: inline-block;
	padding: .2rem .55rem;
	border: 1px solid var(--rule, #d4d8dd);
	border-radius: 999px;
	font-size: var(--step--2, .78rem);
	text-decoration: none;
	color: inherit;
}

.pem-hub-insights__applied a:hover {
	border-color: var(--stop, #8c2f18);
	color: var(--stop, #8c2f18);
}

.pem-hub-insights__empty {
	padding: 1.25rem;
	border: 1px solid var(--rule, #d4d8dd);
	border-radius: 4px;
	max-width: var(--measure, 34rem);
}

.pem-hub-insights__empty p { margin: 0 0 .6rem; }
.pem-hub-insights__empty p:last-child { margin-bottom: 0; }

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

.pem-cards {
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
	display: grid;
	gap: 1.5rem;
}

@media (min-width: 56.25rem) {
	.pem-cards { grid-template-columns: repeat(2, 1fr); }
}

.pem-card {
	border-top: 3px solid var(--ink, #16191d);
	padding-top: .75rem;
	display: flex;
	flex-direction: column;
	gap: .4rem;
}

/* The primary distinguishing device — this is what replaces splitting the
   section into one archive per type. */
.pem-card__type {
	margin: 0;
	font-size: var(--step--2, .78rem);
	text-transform: uppercase;
	letter-spacing: .07em;
	font-weight: 700;
	color: var(--accent, #0b4f6c);
}

.pem-card__date {
	margin: 0;
	font-size: var(--step--2, .78rem);
	color: var(--ink-2, #4a5058);
	font-variant-numeric: tabular-nums;
}

.pem-card__reading::before { content: "· "; }
.pem-card__title { margin: 0; font-size: var(--step-0, 1rem); line-height: 1.35; }
.pem-card__title a { color: inherit; }
.pem-card__excerpt { margin: 0; font-size: var(--step--1, .875rem); line-height: 1.55; }

.pem-card__meta {
	margin: auto 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	align-items: baseline;
	font-size: var(--step--2, .78rem);
}

.pem-card__tag {
	padding: .1rem .45rem;
	background: var(--ground-2, #f4f6f8);
	border-radius: 3px;
	text-decoration: none;
	color: var(--ink-2, #4a5058);
}

/* ------------------------------------------------------------ pagination -- */

/* Numbered, never load-more: an estimator returning to page 6 of a filter set
   cannot do that with load-more. */
.pem-pagination ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: .3rem;
	margin: 0;
	padding: 0;
}

.pem-pagination :is(a, span) {
	display: block;
	min-width: 2.2rem;
	padding: .35rem .5rem;
	text-align: center;
	border: 1px solid var(--rule, #d4d8dd);
	border-radius: 3px;
	text-decoration: none;
	color: inherit;
	font-variant-numeric: tabular-nums;
}

.pem-pagination .is-current {
	background: var(--ink, #16191d);
	border-color: var(--ink, #16191d);
	color: #fff;
	font-weight: 700;
}

/* -------------------------------------------------------------------------
 * T7 — the article. Single column, no sidebar.
 * ---------------------------------------------------------------------- */

.pem-article__type {
	text-transform: uppercase;
	letter-spacing: .08em;
	font-weight: 700;
	color: var(--accent, #0b4f6c);
	margin: 0 0 .3rem;
}

.pem-article__subtitle {
	font-size: var(--step-1, 1.125rem);
	line-height: 1.5;
	color: var(--ink-2, #4a5058);
	max-width: var(--measure, 34rem);
}

.pem-article__byline {
	gap: .75rem;
	color: var(--ink-2, #4a5058);
	font-variant-numeric: tabular-nums;
}

/* Collapsible, and open by default — a reader who wanted the shape of a long
   piece should not have to ask for it twice. */
.pem-toc {
	margin: 0 0 2rem;
	padding: .8rem 1rem;
	border: 1px solid var(--rule, #d4d8dd);
	border-radius: 4px;
	max-width: var(--measure, 34rem);
}

.pem-toc summary { font-weight: 600; cursor: pointer; }
.pem-toc ol { margin: .6rem 0 0; padding-left: 1.2rem; }
.pem-toc li { margin: 0 0 .25rem; }
.pem-toc__level-3 { margin-left: 1rem; list-style-type: circle; }

/* Agora's bibliographical-data pattern. Prominent, because being cited is the
   point of publishing it. */
.pem-citation {
	margin: 2.5rem 0;
	padding: 1.1rem 1.25rem;
	border: 1px solid var(--rule, #d4d8dd);
	border-left: 4px solid var(--accent, #0b4f6c);
	border-radius: 4px;
	max-width: var(--measure, 34rem);
}

.pem-citation h2 { margin: 0 0 .6rem; font-size: var(--step-0, 1rem); }
.pem-citation__text { font-style: italic; line-height: 1.55; margin: 0 0 .8rem; }

.pem-citation__meta {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: .25rem .8rem;
	margin: 0;
	font-size: var(--step--1, .875rem);
}

.pem-citation__meta dt {
	font-size: var(--step--2, .78rem);
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--ink-2, #4a5058);
	font-weight: 600;
}

.pem-citation__meta dd { margin: 0; overflow-wrap: anywhere; }

.pem-downloads { margin: 2rem 0; max-width: var(--measure, 34rem); }
.pem-downloads h2 { font-size: var(--step-0, 1rem); margin: 0 0 .5rem; }
.pem-downloads ul { list-style: none; margin: 0 0 .6rem; padding: 0; }
.pem-downloads li { padding: .4rem 0; border-bottom: 1px solid var(--rule, #d4d8dd); }

/* Type, size and pages together: all three are needed to decide whether to
   open something on a phone, and one alone decides nothing. */
.pem-downloads__facts {
	display: block;
	font-size: var(--step--2, .78rem);
	color: var(--ink-2, #4a5058);
	font-variant-numeric: tabular-nums;
}

.pem-downloads__note { font-size: var(--step--1, .875rem); color: var(--ink-2, #4a5058); margin: 0; }

.pem-related { margin: 2.5rem 0; }
.pem-related h2 { font-size: var(--step-0, 1rem); margin: 0 0 .75rem; }

.pem-issue-link {
	margin: 1.5rem 0;
	padding: .6rem .8rem;
	background: var(--ground-2, #f4f6f8);
	font-size: var(--step--1, .875rem);
}

/* Ramboll's pattern: photo, name, role, and a route into a conversation —
   not a biography paragraph. */
.pem-author {
	margin: 2.5rem 0;
	padding-top: 1.25rem;
	border-top: 2px solid var(--ink, #16191d);
	max-width: var(--measure, 34rem);
}

.pem-author__body { display: flex; gap: 1rem; align-items: start; }
.pem-author__photo { border-radius: 50%; flex: none; }
.pem-author__name { margin: 0; font-weight: 700; }
.pem-author__role { margin: 0 0 .5rem; color: var(--ink-2, #4a5058); font-size: var(--step--1, .875rem); }
.pem-author__actions { margin: 0; display: flex; flex-wrap: wrap; gap: .75rem; font-size: var(--step--1, .875rem); }
.pem-author__discuss { font-weight: 600; }

/* Links out only — no SDK, no iframe, no counts. */
.pem-share { margin: 2rem 0; }
.pem-share__title { font-size: var(--step--1, .875rem); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .5rem; }
.pem-share__list { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; }

.pem-share__link {
	display: inline-block;
	padding: .3rem .7rem;
	border: 1px solid var(--rule, #d4d8dd);
	border-radius: 3px;
	background: none;
	font: inherit;
	font-size: var(--step--1, .875rem);
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}

.pem-share__link:hover { border-color: var(--accent, #0b4f6c); color: var(--accent, #0b4f6c); }

/* -------------------------------------------------------------------------
 * Newsletter issues.
 * ---------------------------------------------------------------------- */

.pem-issue { margin: 2.5rem 0; max-width: var(--measure, 34rem); }
.pem-issue h2 { margin: 0 0 .4rem; font-size: var(--step-1, 1.125rem); }

/* Said once and plainly: it is what makes forwarding one piece possible, and
   a reader will not discover it by hovering the links. */
.pem-issue__note {
	margin: 0 0 1.25rem;
	font-size: var(--step--1, .875rem);
	color: var(--ink-2, #4a5058);
}

.pem-issue__list { list-style: none; margin: 0 0 1rem; padding: 0; counter-reset: issue; }

.pem-issue__item {
	counter-increment: issue;
	padding: .9rem 0 .9rem 2.5rem;
	border-bottom: 1px solid var(--rule, #d4d8dd);
	position: relative;
}

.pem-issue__item::before {
	content: counter(issue);
	position: absolute;
	left: 0;
	top: .9rem;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	color: var(--ink-2, #4a5058);
}

.pem-issue__archive { margin: 0; font-size: var(--step--1, .875rem); }

/* -------------------------------------------------------------------------
 * Comments — open only where an editor has opened them.
 * ---------------------------------------------------------------------- */

.pem-article__comments {
	margin: 3rem 0 0;
	padding-top: 1.5rem;
	border-top: 2px solid var(--ink, #16191d);
	max-width: var(--measure, 34rem);
}

/* Says what happens to the comment and to the email address. A form that asks
   for an email without saying why reads as a mailing-list capture. */
.pem-comments__note {
	padding: .7rem .9rem;
	background: var(--ground-2, #f4f6f8);
	font-size: var(--step--1, .875rem);
	line-height: 1.55;
}
