/*
 * AER Analytics: stat bar, sector cards, country band.
 * Measurements from the approved homepage design (desktop 1280 and mobile 390 artboards) and the
 * preview page built from it. Everything is scoped under .aer-feed so nothing leaks into the theme
 * or Elementor, and every rule the theme might also set is set here explicitly.
 * Hover is colour only, under 200ms, and always mirrored by :focus-visible. No script anywhere.
 */

.aer-feed {
	--aer-green: #01431D;
	--aer-text: #111827;
	--aer-muted: #55606E;
	--aer-pale: #F4F5F3;
	--aer-line: #E2E7E3;
	--aer-gutter: 20px;
	--aer-ease: 150ms ease-out;
	font-family: "Host Grotesk", system-ui, sans-serif;
	color: var(--aer-text);
	-webkit-font-smoothing: antialiased;
}
.aer-feed *,
.aer-feed *::before,
.aer-feed *::after { box-sizing: border-box; }
.aer-feed p,
.aer-feed h2,
.aer-feed h3 { margin: 0; padding: 0; text-transform: none; }
.aer-feed a { text-decoration: none; }
.aer-feed a:focus-visible { outline: 2px solid var(--aer-green); outline-offset: 2px; }

.aer-feed .aer-feed__inner {
	max-width: calc(1200px + 2 * var(--aer-gutter));
	margin: 0 auto;
	padding: 0 var(--aer-gutter);
}
.aer-feed .aer-feed__narrow { display: none; }
.aer-feed .aer-feed__sr {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.aer-feed .aer-feed__blank { font-weight: inherit; }

.aer-feed .aer-feed__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
}
.aer-feed .aer-feed__title {
	font-family: inherit;
	font-size: 36px;
	line-height: 1.2;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--aer-text);
}
.aer-feed .aer-feed__more {
	font-size: 14px;
	line-height: 20px;
	font-weight: 600;
	color: var(--aer-green);
	white-space: nowrap;
	text-decoration: underline;
	text-decoration-color: transparent;
	text-underline-offset: 3px;
	transition: color var(--aer-ease);
}
.aer-feed .aer-feed__more:hover,
.aer-feed .aer-feed__more:focus-visible { color: var(--aer-green); text-decoration-color: currentColor; }

/* [aer_figure] is inline and unstyled; it only needs its screen-reader text hidden. */
.aer-figure__sr {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Stat bar */
.aer-feed.aer-stats { background: #fff; border-bottom: 1px solid var(--aer-line); }
.aer-stats .aer-stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
/* Desktop only, the one range that uses the cqi sizing below. Below 1025 the containment made the
   Elementor widget size to the grid's min-content height, leaving a 15px strip under the bar on phones. */
@media (min-width: 1025px) {
	.aer-stats .aer-stats__grid { container-type: inline-size; }
}
.aer-stats .aer-stats__item { padding: 30px 32px; border-left: 1px solid var(--aer-line); }
.aer-stats .aer-stats__item:first-child { padding-left: 0; border-left: 0; }
.aer-stats .aer-stats__item:last-child { padding-right: 0; }
/* 40px at the full 1200px bar. Narrower bars scale the figures down rather than break them over
   two lines: the design's cells are too narrow for "2015-2025" or the date below about 1180px. */
.aer-stats .aer-stats__value {
	font-size: 40px;
	font-size: min(40px, 3.33cqi);
	white-space: nowrap;
	line-height: 1;
	font-weight: 800;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
	color: var(--aer-green);
}
.aer-stats .aer-stats__label {
	margin-top: 10px;
	font-size: 12px;
	line-height: 1.4;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--aer-muted);
}

/* Sector cards */
.aer-feed.aer-sectors { background: var(--aer-pale); padding: 56px 0 60px; }
.aer-sectors .aer-sectors__grid { margin-top: 26px; display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.aer-sectors .aer-feed__cols-1 { grid-template-columns: 1fr; }
.aer-sectors .aer-feed__cols-2 { grid-template-columns: repeat(2, 1fr); }
.aer-sectors .aer-feed__cols-4 { grid-template-columns: repeat(4, 1fr); }
.aer-feed .aer-sectors__card {
	display: block;
	background-color: #fff;
	border: 1px solid var(--aer-line);
	border-left: 3px solid var(--aer-sector);
	border-radius: 4px;
	padding: 22px 24px 24px;
	color: var(--aer-text);
	transition: background-color var(--aer-ease), border-color var(--aer-ease), color var(--aer-ease);
}
.aer-feed .aer-sectors__card:hover,
.aer-feed .aer-sectors__card:focus-visible {
	color: var(--aer-text);
	border-color: var(--aer-sector);
	background-color: #F9FAF8;
	background-color: color-mix(in srgb, var(--aer-sector) 7%, #fff);
}
.aer-sectors .aer-sectors__name {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.25;
	font-weight: 700;
	letter-spacing: normal;
	color: var(--aer-text);
}
.aer-sectors .aer-sectors__dot { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 2px; background: var(--aer-sector); }
.aer-sectors .aer-sectors__meta {
	margin-top: 4px;
	font-size: 13px;
	line-height: 1.6;
	font-variant-numeric: tabular-nums;
	color: var(--aer-muted);
}
.aer-sectors .aer-sectors__figure { margin-top: 14px; }
.aer-sectors .aer-sectors__value {
	display: block;
	font-size: 44px;
	line-height: 1;
	font-weight: 800;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
	color: var(--aer-text);
}
.aer-sectors .aer-sectors__value .aer-feed__blank { font-size: 28px; letter-spacing: -0.01em; color: var(--aer-muted); }
.aer-sectors .aer-sectors__unit { display: block; margin-top: 8px; font-size: 13px; line-height: 1.6; color: var(--aer-muted); }
.aer-sectors .aer-sectors__caption { margin-top: 18px; font-size: 13px; line-height: 1.6; color: var(--aer-muted); }

/* Country band */
.aer-feed.aer-countries { background: #fff; padding: 72px 0 76px; }
.aer-countries .aer-countries__intro { margin-top: 8px; max-width: 560px; font-size: 15px; line-height: 1.6; color: var(--aer-muted); }
.aer-countries .aer-countries__grid { margin-top: 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.aer-feed .aer-countries__card {
	display: block;
	overflow: hidden;
	background-color: #fff;
	border: 1px solid var(--aer-line);
	border-radius: 4px;
	color: var(--aer-text);
	transition: background-color var(--aer-ease), border-color var(--aer-ease), color var(--aer-ease);
}
.aer-feed .aer-countries__card:hover,
.aer-feed .aer-countries__card:focus-visible { color: var(--aer-text); border-color: var(--aer-green); background-color: var(--aer-pale); }
.aer-feed .aer-countries__photo {
	display: block;
	width: 100%;
	height: 150px;
	max-width: none;
	object-fit: cover;
	border: 0;
	border-radius: 0;
}
.aer-countries .aer-countries__name {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.35;
	font-weight: 700;
	letter-spacing: normal;
	color: var(--aer-text);
}
.aer-feed .aer-countries__flag {
	flex: 0 0 21px;
	width: 21px;
	height: 14px;
	max-width: none;
	object-fit: cover;
	border: 1px solid #DDE2DD;
	border-radius: 0;
}

/* Tablet has no approved artboard: keep desktop type, halve the columns. */
@media (max-width: 1024px) {
	.aer-stats .aer-stats__grid { grid-template-columns: 1fr 1fr; }
	.aer-stats .aer-stats__item,
	.aer-stats .aer-stats__item:first-child,
	.aer-stats .aer-stats__item:last-child { padding: 30px 32px; border-left: 0; }
	.aer-stats .aer-stats__item:nth-child(odd) { padding-left: 0; }
	.aer-stats .aer-stats__item:nth-child(even) { border-left: 1px solid var(--aer-line); }
	.aer-stats .aer-stats__item:nth-child(-n+2) { border-bottom: 1px solid var(--aer-line); }
	.aer-stats .aer-stats__value { font-size: 40px; }
	.aer-sectors .aer-sectors__grid,
	.aer-sectors .aer-feed__cols-4 { grid-template-columns: repeat(2, 1fr); }
	.aer-countries .aer-countries__grid { grid-template-columns: repeat(2, 1fr); }
}

/* Phone, from the 390 artboard. */
@media (max-width: 767px) {
	.aer-feed .aer-feed__wide { display: none; }
	.aer-feed .aer-feed__narrow { display: inline; }
	.aer-feed .aer-feed__title { font-size: 26px; }

	.aer-stats .aer-feed__inner { padding: 0; }
	.aer-stats .aer-stats__grid { grid-template-columns: 1fr 1fr; }
	.aer-stats .aer-stats__item,
	.aer-stats .aer-stats__item:first-child,
	.aer-stats .aer-stats__item:last-child,
	.aer-stats .aer-stats__item:nth-child(odd) { padding: 20px; border-left: 0; }
	.aer-stats .aer-stats__item:nth-child(even) { border-left: 1px solid var(--aer-line); }
	.aer-stats .aer-stats__item:nth-child(-n+2) { border-bottom: 1px solid var(--aer-line); }
	.aer-stats .aer-stats__value { font-size: 30px; }
	.aer-stats .aer-stats__item:nth-child(n+3) .aer-stats__value,
	.aer-stats .aer-stats__item--updated .aer-stats__value { font-size: 24px; line-height: 1.1; }
	.aer-stats .aer-stats__label { margin-top: 7px; font-size: 11px; letter-spacing: 0.12em; }

	.aer-feed.aer-sectors { padding: 32px 0 34px; }
	.aer-sectors .aer-sectors__grid,
	.aer-sectors .aer-feed__cols-2,
	.aer-sectors .aer-feed__cols-4 { margin-top: 18px; gap: 10px; grid-template-columns: 1fr; }
	.aer-feed .aer-sectors__card { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 8px; padding: 16px 18px; }
	.aer-sectors .aer-sectors__name { font-size: 15px; }
	.aer-sectors .aer-sectors__meta { margin-top: 0; font-size: 12px; text-align: right; }
	.aer-sectors .aer-sectors__figure { grid-column: 1 / -1; margin-top: 10px; }
	.aer-sectors .aer-sectors__value { font-size: 34px; }
	.aer-sectors .aer-sectors__unit { margin-top: 6px; font-size: 12px; }
	.aer-sectors .aer-sectors__caption { margin-top: 14px; font-size: 12px; }

	.aer-feed.aer-countries { padding: 40px 0 42px; }
	.aer-countries .aer-countries__intro { font-size: 14px; }
	.aer-countries .aer-countries__grid { margin-top: 18px; gap: 10px; grid-template-columns: 1fr 1fr; }
	.aer-feed .aer-countries__photo { height: 104px; }
	.aer-countries .aer-countries__name { gap: 8px; padding: 11px 12px; font-size: 14px; }
	.aer-feed .aer-countries__flag { flex-basis: 20px; width: 20px; height: 13px; }
	.aer-countries .aer-countries__more-below { display: inline-block; margin-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.aer-feed .aer-sectors__card,
	.aer-feed .aer-countries__card,
	.aer-feed .aer-feed__more { transition: none; }
}
