/* Agency list: the A-Z directory sits in a closed <details> (added by inc/tpl-agency.php) so phones are not 60 screens tall.
   All links/text stay in the DOM. Hero is compacted on phones. */
.poea-pg--agency-list .agency-az > summary { list-style: none; }
.poea-pg--agency-list .agency-az > summary::-webkit-details-marker { display: none; }
.poea-pg--agency-list .agency-more { display: flex; align-items: center; justify-content: center; width: fit-content; margin: 16px auto; min-height: 44px; padding: 0 24px; border-radius: 9999px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--primary-light); background: var(--background-secondary); border: 1px solid var(--primary); }
.poea-pg--agency-list .agency-az[open] > .agency-more { margin-bottom: 16px; }
.poea-pg--agency-list .agency-more:hover { background: var(--primary-100); }
.poea-pg--agency-list .company-group { margin-bottom: 12px; }
.poea-pg--agency-list .company-letters a, .poea-pg--agency-list .company-letters .c-tag { min-height: 32px; min-width: 32px; }
@media (max-width: 767.98px) {
	.poea-pg--agency-list .company-group-inner { padding: 12px 14px; }
	.poea-pg--agency-list .company-group-inner li a { padding: 4px 0; font-size: 14px; line-height: 1.3; }
	/* hero: smaller illustration (still in the DOM with its alt) so search starts on the first screen */
	.poea-pg--agency-list .l-clear-header { padding-top: 80px; }
	.poea-pg--agency-list .l-app > .elementor { padding-top: 0; }
	.poea-pg--agency-list .elementor-top-section:first-of-type { padding-top: 0; }
	.poea-pg--agency-list .elementor-top-section:first-of-type > .elementor-container { padding-top: 0; }
	.poea-pg--agency-list .elementor-inner-section img { display: block; width: auto; max-height: 96px; margin-inline: auto; object-fit: contain; }
	.poea-pg--agency-list .elementor-inner-section .elementor-col-50:last-child { max-height: 0; overflow: hidden; padding: 0; } /* illustration stays in the DOM (clipped, not display:none) */
	.poea-pg--agency-list .elementor-inner-section h1 { font-size: 28px; line-height: 1.15; }
	.poea-pg--agency-list .elementor-inner-section .elementor-widget-wrap, .poea-pg--agency-list .elementor-inner-section .elementor-element-populated { padding-block: 4px; }
}
/* Per-letter closed <details>: summary holds the letter h2. */
.poea-pg--agency-list .agency-letter > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; list-style: none; }
.poea-pg--agency-list .agency-letter > summary::-webkit-details-marker { display: none; }
.poea-pg--agency-list .agency-letter > summary::after { content: "+"; margin-inline-start: auto; font-size: 20px; color: var(--primary-light); }
.poea-pg--agency-list .agency-letter[open] > summary::after { content: "\2212"; }
.poea-pg--agency-list .agency-letter > summary .company-letter { margin: 0; }
@media (max-width: 360px) { .poea-pg--agency-list .elementor-inner-section h1 { font-size: 22px; line-height: 1.15; } }
@media (max-width: 767.98px) {
	/* hero illustration sat as 96px of blank space; keep it in the DOM, clipped */
	.poea-pg--agency-list .elementor-top-section:first-of-type .elementor-widget-image { max-height: 0; overflow: hidden; margin: 0; }
}
@media (max-width: 767.98px) { body.poea-pg--agency-list .elementor h1.elementor-heading-title { font-size: 32px !important; line-height: 1.1; } }
@media (max-width: 360px) { body.poea-pg--agency-list .elementor h1.elementor-heading-title { font-size: 26px !important; } }
/* Compact closed letter rows: letter, count, chevron (<=64px). */
.poea-pg--agency-list .agency-az .company-group { margin: 0 0 8px; }
.poea-pg--agency-list .agency-az .company-group-inner { padding: 8px 16px; }
.poea-pg--agency-list .agency-letter > summary { gap: 12px; min-height: 48px; }
.poea-pg--agency-list .agency-letter > summary .company-letter { flex: none; box-sizing: border-box; width: 44px; font-size: 20px; line-height: 1; padding: 10px 0; text-align: center; } /* one tile width (I 33px .. W 46px pushed the counts out of line) */
.poea-pg--agency-list .agency-count { font-size: 13px; color: var(--text-secondary); }
.poea-pg--agency-list .agency-letter > summary::after { content: ""; width: 8px; height: 8px; border: solid var(--primary-light); border-width: 0 2px 2px 0; transform: rotate(45deg); margin-inline-end: 4px; }
.poea-pg--agency-list .agency-letter[open] > summary::after { content: ""; transform: rotate(225deg); }
.poea-pg--agency-list .agency-az .companies-overview { gap: 8px 24px; }
.poea-pg--agency-list .agency-az .company-group { margin: 0 0 8px; padding: 0; } /* 8px between letter cards (0 left the borders touching) */

/* Round 18: type scale (qa/ux/TYPE_SCALE.md), full-width directory, even chip row, no 320 overflow. */
body.poea-pg--agency-list .elementor h1.elementor-heading-title { font-size: clamp(28px, 2.5vw + 18px, 44px) !important; line-height: 1.15 !important; letter-spacing: -.025em; }
@media (max-width: 360px) { body.poea-pg--agency-list .elementor h1.elementor-heading-title { font-size: 26px !important; } }
body.poea-pg--agency-list .elementor h2.elementor-heading-title { font-size: clamp(22px, 1.5vw + 16px, 32px) !important; line-height: 1.2 !important; font-weight: 700 !important; }
body.poea-pg--agency-list .elementor h5.elementor-heading-title { font-size: 16px !important; font-weight: 600 !important; }
.poea-pg--agency-list .elementor h3, .poea-pg--agency-list .c-job-card__title { font-size: 18px; font-weight: 600; }
.poea-pg--agency-list h2.company-letter { font-weight: 700; }
.poea-pg--agency-list .elementor-column:has(.companies-listing-a-z) { width: 100%; max-width: 100%; }
.poea-pg--agency-list .companies-listing-a-z .company-letters ul { justify-content: flex-start; gap: 8px; }
.poea-pg--agency-list .agency-az, .poea-pg--agency-list .companies-overview { max-width: 100%; box-sizing: border-box; }
.poea-pg--agency-list .agency-az .company-group-inner { min-width: 0; box-sizing: border-box; }
.poea-pg--agency-list .agency-letter ul { min-width: 0; overflow-wrap: anywhere; }
.poea-pg--agency-list .elementor-column:has(.companies-listing-a-z) { flex: 1 1 100%; }
.poea-pg--agency-list .elementor-container:has(.companies-listing-a-z) { padding-inline: 0; }
@media (max-width: 480px) {
	.poea-pg--agency-list .agency-letter > ul, .poea-pg--agency-list .company-group-inner > ul { column-width: auto; column-count: 1; }
	.poea-pg--agency-list .agency-az .company-group-inner { padding-inline: 12px; }
}
.poea-pg--agency-list .elementor-column:has(.companies-listing-a-z) > .elementor-widget-wrap { width: 100%; }
.poea-pg--agency-list .elementor-widget:has(> .elementor-widget-container > .companies-listing-a-z) { width: 100%; max-width: 100%; }
body.poea-pg--agency-list .elementor .companies-listing-a-z .company-letters a.c-tag.chosen { color: #fff; }
@media (max-width: 480px) { .poea-pg--agency-list .agency-letter > ul { display: block; } .poea-pg--agency-list .agency-letter li a { overflow-wrap: anywhere; } }
.poea-pg--agency-list .elementor-column:has(.companies-listing-a-z) { width: 100% !important; max-width: 100% !important; flex: 1 1 100% !important; }
.poea-pg--agency-list .elementor-column:has(.companies-listing-a-z) > .elementor-widget-wrap, .poea-pg--agency-list .elementor-widget:has(> .elementor-widget-container > .companies-listing-a-z) { width: 100% !important; max-width: 100% !important; }
body.poea-pg--agency-list .elementor .companies-listing-a-z .company-letters a.c-tag.chosen { color: #fff !important; }
.poea-pg--agency-list .elementor-container:has(.companies-listing-a-z) { flex-wrap: wrap !important; padding-inline: 0 !important; }
.poea-pg--agency-list .elementor-container:has(.companies-listing-a-z) > .elementor-column { width: 100% !important; flex: 1 1 100% !important; }
.poea-pg--agency-list .agency-az .company-group { width: 100%; }
@media (min-width: 768px) { .poea-pg--agency-list .agency-letter[open] > ul { column-width: 260px; column-gap: 24px; } }
/* An open letter spans all columns: in one column it stretched the column set ~5000px and stranded the other letters. */
.poea-pg--agency-list .agency-az .company-group:has(.agency-letter[open]) { column-span: all; margin-block: 8px; }

/* Round 20: "All" chip matches the letter chips; tighter hero-to-featured gap on desktop. */
body.poea-pg--agency-list .company-letters a.c-tag.all { border-radius: 9999px !important; min-height: 36px; min-width: 36px; padding: 0 14px; color: #fff !important; background: #303af7 !important; border-color: #303af7 !important; box-shadow: none; }
@media (min-width: 768px) {
	.poea-pg--agency-list .elementor-top-section:first-of-type > .elementor-container { padding-bottom: 0; }
	.poea-pg--agency-list .elementor-top-section:first-of-type + .elementor-top-section { padding-top: 0; }
	.poea-pg--agency-list .elementor-top-section:first-of-type + .elementor-top-section .elementor-widget-spacer:first-child .elementor-spacer-inner { height: 0 !important; }
}
/* Open letter: names start on the letter-tile edge (the plugin's 15px link inset put them 16px right of the tile; /companies-list/ is already flush) */
body.poea-pg--agency-list .companies-listing-a-z .companies-overview .company-group li a { padding-inline: 0; }
