/* 4D Infrastructure site chrome and templates (front end only). */

/* Notice banner */
.site-notice { background: var(--color-notice); color: var(--color-text); font-size: 0.875rem; }
.site-notice__inner { display: flex; align-items: center; gap: 0.75rem; min-height: 34px; padding-block: 0.4rem; }
.site-notice__icon { display: inline-flex; flex: 0 0 auto; align-self: center; color: #000; }
.site-notice__icon svg { display: block; width: 18px; height: 18px; }
.site-notice__text { margin: 0; flex: 1; }
.site-notice__text a { color: inherit; font-weight: 700; text-decoration: underline; }
.site-notice__close { display: inline-flex; padding: 0.25rem; border: 0; background: none; color: inherit; cursor: pointer; }
.site-notice__close svg { width: 18px; height: 18px; }

/* Header (measured from www.4dinfra.com: 34px black stripe, 84px masthead, 154x48 logo) */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--color-white); box-shadow: 5px 0 15px rgba(0, 0, 0, 0.05); }
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

.topbar { background: var(--color-black); color: var(--color-white); font-size: 0.875rem; line-height: 20px; }
.topbar__inner { display: flex; justify-content: flex-end; min-height: 34px; }
.topbar__menu { display: flex; align-items: stretch; gap: 0; margin: 0; padding: 0; list-style: none; }
.topbar__menu > li { position: relative; display: flex; }
.topbar__menu a { display: flex; align-items: center; gap: 0.5rem; padding: 7px 12px; color: inherit; font-weight: 400; text-decoration: none; }
.topbar__menu a:hover { color: var(--color-brand); text-decoration: none; }
.topbar__menu > .menu-item-has-children > a::after { content: ""; width: 7px; height: 7px; margin-left: 0.35rem; border-right: 2px solid; border-bottom: 2px solid; transform: translateY(-3px) rotate(45deg); }
.topbar__menu .sub-menu { position: absolute; top: 100%; left: 0; z-index: 110; min-width: 100%; margin: 0; padding: 6px 0; list-style: none; background: var(--color-white); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); opacity: 0; visibility: hidden; transition: opacity 0.15s, visibility 0.15s; }
.topbar__menu .sub-menu a { padding: 6px 16px; color: var(--color-text); line-height: 20px; white-space: nowrap; }
.topbar__menu .sub-menu a:hover, .topbar__menu .sub-menu [aria-current="true"] { color: var(--color-brand); }
.topbar__menu > li > a[aria-expanded="true"] + .sub-menu { opacity: 1; visibility: visible; }
.topbar__menu > li > a:not([href]) { cursor: default; }
.topbar__menu > li > a:not([href]):hover { color: inherit; }
.topbar__menu li:hover > .sub-menu, .topbar__menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; }

.masthead__inner { display: flex; align-items: center; gap: 0; min-height: var(--header-height); }
.site-logo { flex: 0 0 auto; margin: 12px auto 12px 0; }
.site-logo img { width: auto; height: 48px; }

.primary-nav__menu { display: flex; align-items: center; gap: 0; margin: 0; padding: 0; list-style: none; }
.primary-nav__menu > li { position: relative; }
.primary-nav__menu > li > a { display: block; padding: 28px 22px; color: var(--color-text); font-size: 1.125rem; font-weight: 500; line-height: 27px; text-decoration: none; }
.primary-nav__menu > li > a:hover, .primary-nav__menu > li:hover > a, .primary-nav__menu > .current-menu-item > a, .primary-nav__menu > .current-menu-ancestor > a, .primary-nav__menu > .current-page-ancestor > a { color: var(--color-brand); text-decoration: none; }
.primary-nav__menu .sub-menu { position: absolute; top: 100%; left: 0; z-index: 10; width: auto; min-width: 200px; margin: 0; padding: 0; list-style: none; background: #f2f2f2; border-top: 1px solid #f2f2f2; white-space: nowrap; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity 0.25s ease-in-out, visibility 0.25s ease-in-out, transform 0.25s ease-in-out; }
.primary-nav__menu li:hover > .sub-menu, .primary-nav__menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(1px); }
.primary-nav__menu .sub-menu a { display: block; padding: 11px 28px; color: var(--color-text); font-size: 1.125rem; font-weight: 400; line-height: 27px; text-decoration: none; transition: color 0.25s, background-color 0.25s; }
.primary-nav__menu .sub-menu a:hover, .primary-nav__menu .sub-menu a:focus-visible { background: var(--color-white); color: var(--color-brand); }
.primary-nav__menu .sub-menu .current-menu-item > a { color: var(--color-brand); }
.primary-nav__topbar { display: none; }
/* Subscribe button in the header (BugHerd #124) */
.primary-nav__subscribe.btn { flex: 0 0 auto; margin-left: 12px; padding: 10px 24px; font-size: 1rem; line-height: 1.5; white-space: nowrap; }
@media (min-width: 1224px) { .primary-nav { display: flex; align-items: center; } }
@media (max-width: 1223px) { .primary-nav__subscribe.btn { display: block; margin: 1.5rem 0 0; text-align: center; } }

.site-search { display: flex; align-items: center; justify-content: flex-end; width: 68px; align-self: stretch; margin-right: -12px; }
.site-search__toggle, .menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--color-text); cursor: pointer; }
.site-search__toggle svg { width: 22px; height: 22px; }
.site-search__form { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; padding: 16px 0; background: var(--color-white); box-shadow: inset 0 2px 15px rgba(0, 0, 0, 0.04), 0 8px 15px rgba(0, 0, 0, 0.05); }
.site-search__inner { position: relative; display: flex; align-items: center; gap: 0; }
.site-search__icon { position: absolute; left: calc(var(--gutter) + 8px); top: 50%; display: flex; color: var(--color-muted); transform: translateY(-50%); pointer-events: none; }
.site-search__icon svg { width: 20px; height: 20px; }
.site-search__form[hidden] { display: none; }
.site-search__form input { flex: 1; min-width: 0; height: 55px; padding: 17px 16px 17px 40px; border: 0; background: var(--color-white); font: inherit; font-size: 1.125rem; }
.site-search__form input:focus { outline: none; }
.site-search__form input:focus-visible { outline: 2px solid var(--color-brand); outline-offset: -2px; }
.search-form input { flex: 1; min-width: 0; height: 57px; padding: 17px; border: 1px solid #ccc; border-radius: 0; background: #f4f4f4; font: inherit; font-size: 1.125rem; }
.site-search__form .btn { flex: 0 0 auto; }

.menu-toggle { display: none; width: 42px; height: 38px; }
.menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after { display: block; width: 26px; height: 2px; background: currentColor; transition: transform 0.2s; }
.menu-toggle__bars { position: relative; }
.menu-toggle__bars::before, .menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -8px; }
.menu-toggle__bars::after { top: 8px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1223px) {
	.site-logo img { height: 48px; }
	.site-search { order: 2; width: auto; margin-right: 0; }
	.menu-toggle { display: inline-flex; order: 3; margin-left: 0.5rem; }
	.primary-nav { position: fixed; inset: var(--header-height) 0 0 0; z-index: 90; overflow-y: auto; padding: 0 var(--gutter) 3rem; background: var(--color-white); visibility: hidden; opacity: 0; transition: opacity 0.2s, visibility 0.2s; }
	.admin-bar .primary-nav { top: calc(var(--header-height) + var(--wp-admin--admin-bar--height, 46px)); }
	.primary-nav.is-open { visibility: visible; opacity: 1; }
	.primary-nav__menu { flex-direction: column; align-items: stretch; gap: 0; }
	.primary-nav__menu > li { border-bottom: 1px solid var(--color-border); }
	.primary-nav__menu > li > a { padding: 18px 0; font-size: 1.125rem; }
	.primary-nav__menu .sub-menu { position: static; width: auto; min-width: 0; padding: 0 0 0.75rem; border: 0; background: none; white-space: normal; opacity: 1; visibility: visible; transform: none; }
	.primary-nav__menu .sub-menu a { padding: 8px 0 8px 1rem; font-size: 1rem; }
	.primary-nav__topbar { display: none; }
	.primary-nav__topbar-menu, .primary-nav__topbar-menu .sub-menu { margin: 0; padding: 0; list-style: none; }
	.primary-nav__topbar-menu a { display: block; padding: 0.4rem 0; color: var(--color-muted); font-size: 0.9375rem; }
	.primary-nav__topbar-menu .sub-menu { padding-left: 1rem; }
	body.nav-open { overflow: hidden; }
}
@media (max-width: 767px) {
	.site-logo img { height: 41px; }
	.topbar__inner { flex-wrap: wrap; justify-content: center; }
	.topbar__menu { flex-wrap: wrap; justify-content: center; max-width: 100%; }
	.topbar__menu a { padding: 7px 8px; }
	.topbar__menu > li:last-child .sub-menu { left: auto; right: 0; }
}

/* Page flow: core blocks placed between sections sit in the narrow column */
.page-content > :not(.section):not(.alignfull):not(.wp-block-group) {
	max-width: calc(var(--container-narrow) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* Page banner: photo with the 4D blue shape over the left 65%, white title (as www.4dinfra.com) */
.page-banner { position: relative; display: flex; align-items: center; min-height: 180px; overflow: hidden; background: #c7cdd2; color: var(--color-white); }
.page-banner__media { position: absolute; inset: 0; z-index: 0; }
.page-banner__media::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 65%; background: url("../images/banner-shape.svg") no-repeat 100% 50% / cover; }
.page-banner__image { width: 100%; height: 100%; object-fit: cover; }
.page-banner__inner { position: relative; z-index: 1; padding-block: 8px; }
.page-banner__title { max-width: 550px; margin: 0; color: var(--color-white); font-size: var(--fs-h1); font-weight: 500; line-height: 1; text-shadow: 1px 0 22px rgba(255, 255, 255, 0.5); }
@media (min-width: 768px) { .page-banner { min-height: 280px; } }
@media (max-width: 767px) { .page-banner__media::after { width: 100%; } }

/* Insight card (archive: white box, type and date at the bottom; home: on the page, meta above the title) */
.insight-card { height: 100%; }
.insight-card__link { display: flex; flex-direction: column; height: 100%; background: var(--color-white); color: var(--color-text); text-decoration: none; }
.insight-card__link:hover { text-decoration: none; }
.insight-card__link:hover .insight-card__title { color: var(--color-brand); }
.insight-card__media { aspect-ratio: 16 / 9; overflow: hidden; background: #dfe3e8; }
.insight-card__image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.insight-card__link:hover .insight-card__image { transform: scale(1.05); }
.insight-card__body { display: flex; flex: 1; flex-direction: column; padding: 24px; }
.insight-card__meta { order: 3; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: auto 0 0; padding-top: 24px; color: var(--color-muted); font-size: 0.875rem; font-weight: 500; line-height: 1.75; }
.insight-card__title { order: 1; margin: 0 0 16px; font-family: var(--font-body); font-size: 1.125rem; font-weight: 500; line-height: 1.3; transition: color 0.2s; }
.insight-card__excerpt { order: 2; margin: 0; font-size: 1rem; line-height: 1.75; }
/* Home "Latest insights" cards */
.latest-insights .insight-card__link { background: none; }
.latest-insights .insight-card__media { aspect-ratio: 450 / 320; }
.latest-insights .insight-card__body { padding: 24px 0 0; }
.latest-insights .insight-card__meta { order: 0; justify-content: flex-start; gap: 8px; margin: 0; padding: 0; line-height: 20px; }
.latest-insights .insight-card__meta > * + *::before { content: "\2022"; margin-right: 8px; }
.latest-insights .insight-card__title { margin: 16px 0 8px; font-size: 1.25rem; line-height: 1.25; }
.latest-insights .insight-card__excerpt { margin-top: 8px; font-size: 1.125rem; font-weight: 300; line-height: 28px; }

/* Insights archive */
.insights-archive { background: var(--color-grey-blue); }
.insights-filter { display: flex; flex-direction: column; max-width: 616px; margin-bottom: 48px; }
.insights-filter label { margin-bottom: 8px; font-size: 1.125rem; font-weight: 500; line-height: 39px; }
.insights-filter__select { width: 100%; height: 64px; padding: 0 40px 0 24px; border: 1px solid #858585; border-radius: var(--radius-pill); background: #fbfeff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23282728' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 22px center; color: #000; font: inherit; font-size: 1.125rem; line-height: 31px; appearance: none; cursor: pointer; }
.insights-archive .card-grid { gap: 48px 32px; }
.pagination, .navigation.pagination { margin-top: 64px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-start; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 5px; border-radius: 100%; color: var(--color-text); text-decoration: none; }
.page-numbers.current { background: var(--color-brand); color: var(--color-white); }
.page-numbers:hover:not(.current) { color: var(--color-brand); text-decoration: none; }
.page-numbers.prev, .page-numbers.next { border-radius: var(--radius-pill); padding-inline: 12px; }

/* Single insight (850px column, as www.4dinfra.com articles) */
.single-post .site-main > .section:first-child { padding-block: 72px 112px; }
.insight__title { margin: 0 0 16px; color: #000; font-size: clamp(2.5rem, 2rem + 2vw, 3.625rem); line-height: 1; }
.insight__tags { display: flex; flex-wrap: wrap; align-items: center; margin: 0 0 32px; padding: 0; list-style: none; color: var(--color-muted); font-size: 1rem; line-height: 28px; }
.insight__tags li + li::before { content: ""; display: inline-block; width: 4px; height: 4px; margin: 0 10px; border-radius: 50%; background: currentColor; vertical-align: middle; }
.insight__tags a { color: inherit; text-decoration: none; }
.insight__tags a:hover { color: var(--color-brand); }
.insight__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 32px; font-size: 1.25rem; line-height: 1.75; }
.share { display: flex; align-items: center; gap: 16px; margin: 0; padding: 0; list-style: none; }
.share__label { margin-right: 0; font-weight: 400; letter-spacing: 1px; }
.share a { display: inline-flex; width: 32px; height: 32px; color: var(--color-brand); }
.share a:hover { color: var(--color-text); }
.share svg { width: 32px; height: 32px; }
.single-post .entry-content { font-size: 1rem; line-height: 1.5; }
.single-post .entry-content p { margin: 8px 0 16px; }
.single-post .entry-content > p:first-child { font-size: 1.25rem; font-weight: 500; line-height: 1.5; }
.insight__media { margin-bottom: 2rem; }
.insight__media iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.insight__download { margin-top: 2.5rem; }
.insight__disclaimer { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); color: var(--color-text); font-size: 1rem; line-height: 1.5; }
.insight-more__title { font-size: 1.75rem; color: var(--color-brand); }
.insight-more__list { margin: 0; padding: 0; list-style: none; }
.insight-more__list li { margin-bottom: 0.5rem; }
.insight-more__list a { font-weight: 500; }

/* People: 5 across, 3:4 photos with a rounded top-right corner and hairline border */
.team-grid__list { display: grid; gap: 40px 24px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .team-grid__list { grid-template-columns: repeat(3, 1fr); gap: 64px 32px; } }
@media (min-width: 1080px) { .team-grid__list { grid-template-columns: repeat(5, 1fr); gap: 80px 48px; } }
.team-grid__list--compact { justify-content: center; }
.person-card { display: flex; flex-direction: column; color: var(--color-text); text-decoration: none; }
.person-card:hover { text-decoration: none; }
.person-card__photo { position: relative; display: block; aspect-ratio: 300 / 400; overflow: hidden; border-radius: 0 16% 0 0 / 0 12% 0 0; background: var(--color-white); }
/* As on live: the photo is cropped to the top square (head and shoulders), then centred in the 3:4 card (BugHerd #99). */
.person-card__photo img { position: absolute; top: 0; left: -16.667%; width: 133.333%; max-width: none; height: auto; }
/* Border drawn as an SVG so it can trace round the card on hover (as www.4dinfra.com) */
.person-card__border { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.person-card__border path { fill: none; stroke-width: 2px; }
.person-card__track { stroke: #e6e6e6; }
.person-card__progress { stroke: var(--color-brand); stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 0.25s ease-in-out; }
.person-card:hover .person-card__progress, .person-card:focus-visible .person-card__progress { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { .person-card__progress { transition: none; } }
.person-card__name { margin: 16px 0 8px; font-size: 1.25rem; font-weight: 700; line-height: 1.75; }
.person-card:hover .person-card__name { color: var(--color-brand); }
.person-card__role { font-size: 1.125rem; line-height: 1.5; }

/* Single person (1100px column: 200px photo, details beside) */
.single-team_member .site-main > .section:first-child { padding-block: 112px 80px; }
.person__inner { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 768px) { .person__inner { grid-template-columns: 200px 1fr; gap: 48px; } }
.person__photo img { width: 100%; max-width: 200px; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 0; border: 2px solid var(--color-border); border-radius: 0 16% 0 0 / 0 12% 0 0; }
.person__name { margin-bottom: 16px; font-size: 2.25rem; line-height: 1; }
.person__role { margin: 0 0 16px; font-weight: 500; }
.person__quals { margin: 0 0 24px; font-weight: 700; }
.team-more .container { text-align: center; }
.team-more__title { margin-bottom: 48px; color: var(--color-brand); font-size: 1.75rem; }
.team-grid__list--compact { grid-template-columns: repeat(auto-fit, minmax(160px, 200px)); }

/* Search */
.search-form { display: flex; align-items: center; gap: 0 1rem; margin-bottom: 2rem; }
.search-results__list { margin: 0; padding: 0; list-style: none; }
.search-result { padding-block: 1.25rem; border-bottom: 1px solid var(--color-border); }
.search-result__title { display: inline-block; padding-block: 2px; font-size: 1.25rem; font-weight: 500; }
.search-result p { margin: 0.35rem 0 0; }

/* Footer (as www.4dinfra.com: #343334, 48px padding, grey links 16px) */
.site-footer { background: var(--color-dark); color: var(--color-white); font-size: 1rem; line-height: 1.5; }
.site-footer__top { display: grid; gap: 32px; padding-block: 48px; }
@media (min-width: 1080px) { .site-footer__top { grid-template-columns: minmax(0, 482px) 1fr 294px 312px auto; column-gap: 0; } .site-footer__top > :nth-child(2) { grid-column: 3; } }
@media (min-width: 768px) and (max-width: 1079px) { .site-footer__top { grid-template-columns: 1fr 1fr 1fr; } .site-footer__ack { grid-column: 1 / -1; } }
.site-footer__ack p { max-width: 482px; margin: 24px 0 0; }
.site-footer__menu { margin: 24px 0 0; padding: 0; list-style: none; }
.site-footer__menu li + li { margin-top: 20px; }
.site-footer__menu a { display: inline-block; color: #cbcbcb; line-height: 24px; }
.site-footer__menu a:hover { color: var(--color-white); text-decoration: none; }
.site-footer__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 32px; margin-top: 24px; }
@media (min-width: 1080px) { .site-footer__actions { align-items: center; } }
.site-footer__actions .btn { padding: 17px 30px; }
.site-footer__social { display: flex; gap: 24px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 767px) { .site-footer__top { gap: 0; } .site-footer__menu { margin-top: 20px; } .site-footer__links + .site-footer__links .site-footer__menu { margin-top: 20px; } .site-footer__actions { align-items: flex-start; margin-top: 32px; } .site-footer__social { align-self: center; } }
.site-footer__social a { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--color-white); color: var(--color-dark); }
.site-footer__social a:hover { background: var(--color-brand); color: var(--color-white); }
.site-footer__social svg { width: 16px; height: 16px; }
.site-footer__bottom { padding-block: 0; font-size: 0.875rem; line-height: 1; }
.site-footer__bottom p { margin: 0; padding: 29px 0 29px; border-top: 1px solid #cbcbcb; }

.insight__image { margin: 0 0 32px; } .insight__image img { width: 100%; height: auto; }
/* Enquiry form panel (as the old "My details" form card) */
.text-block:has(.gform_wrapper) > .container--medium { width: calc(100% - 2 * var(--gutter)); max-width: var(--container-medium); padding: 36px; border: 1px solid var(--color-border); background: var(--color-white); }
@media (max-width: 767px) { .text-block:has(.gform_wrapper) > .container--medium { padding: 24px 16px; } }
.text-block:has(.gform_wrapper) .text-block__title { font-size: 1.875rem; font-weight: 400; line-height: 1.75; }
.insights-archive.section--space-default { padding-top: 48px; }
@media (max-width: 767px) { .cta-band__buttons .btn, .text-media__actions .btn { width: 100%; } }

/* Long emails / URLs in content wrap instead of overflowing on small screens */
.entry-content, .site-main a[href^="mailto:"], .site-main p, .site-main li { overflow-wrap: anywhere; }

/* Section headings kept as H2 for order but styled like the live site's H4 (e.g. inside tables) */
.wp-block-table td > h2 { font-size: var(--fs-h4); line-height: 1.23; }
/* Heading kept at the right level for screen readers but shown small (was an H5 on the live site) */
.wp-block-heading.is-small-heading { font-size: 1.25rem; line-height: 1.4; }

/* Section links under the banner (measured from www.4dinfra.com) */
.in-page-nav { margin-top: 24px; padding-bottom: 20px; border-bottom: 1px solid #e6e6e6; }
.in-page-nav__list { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0; padding: 0; list-style: none; }
.in-page-nav__list a { display: inline-block; padding-block: 2px; color: var(--color-text); font-size: 1.125rem; font-weight: 400; line-height: 27px; text-decoration: none; }
.in-page-nav__list a:hover { color: var(--color-brand); }
.in-page-nav__list a.is-active { font-weight: 700; }
@media (max-width: 767px) { .in-page-nav__list { gap: 4px 20px; } .in-page-nav__list a { font-size: 1rem; } }
/* Article headings moved up a level for screen readers keep their original size */
.entry-content h2.is-from-h3 { font-size: var(--fs-h3); }
.entry-content h3.is-from-h4 { font-size: var(--fs-h4); }
.entry-content h4.is-from-h5 { font-size: 0.83em; }
.entry-content h5.is-from-h6 { font-size: 0.67em; }

/* Insight article body (measured from www.4dinfra.com) */
.insight .entry-content ul, .insight .entry-content ol { margin: 0 0 16px; padding-left: 40px; }
.insight .entry-content li { margin: 0 0 10px; }
.insight__intro { margin-bottom: 32px; }
.insight__intro p { margin: 8px 0 0; }
.insight__media--audio iframe { aspect-ratio: auto; height: 180px; }
.share__label { font-size: 1.25rem; }

/* Styled dropdown (insights filter), as www.4dinfra.com's "nice select" */
.dropdown { position: relative; }
.dropdown__button { position: relative; display: block; width: 100%; padding: 20px 40px 20px 24px; border: 1px solid #858585; border-radius: var(--radius-pill); background: #fbfeff; color: #000; font: inherit; font-size: 1.125rem; line-height: 22.5px; letter-spacing: 1.78px; text-align: left; cursor: pointer; transition: border-color 0.2s; }
.dropdown__button:hover { border-color: #d8d8d8; }
.dropdown__button::after { content: ""; position: absolute; top: 50%; right: 28px; width: 9px; height: 9px; margin-top: -6px; border-right: 2px solid #333; border-bottom: 2px solid #333; transform: rotate(45deg); transition: transform 0.15s ease-in-out; }
.dropdown.is-open .dropdown__button::after { transform: rotate(-135deg); margin-top: -2px; }
.dropdown__list { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; margin: 8px 0 0; padding: 8px 24px 8px 0; list-style: none; background: #fff; box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1); opacity: 0; pointer-events: none; transform: scale(0.75) translateY(-21px); transform-origin: 50% 0; transition: transform 0.2s cubic-bezier(0.5, 0, 0, 1.25), opacity 0.15s ease-out; }
.dropdown.is-open .dropdown__list { opacity: 1; pointer-events: auto; transform: scale(1) translateY(0); }
/* An open list hangs over the next section (e.g. the Performance fund selector above "Looking for more?"):
   lift its section above the following ones, which otherwise paint on top (.section > * has z-index 1). */
.section:has(.dropdown.is-open) > * { z-index: 5; }
.dropdown__list:focus { outline: none; }
.dropdown__option { padding: 10px 0 10px 16px; color: #000; font-size: 1.125rem; line-height: 1.5; cursor: pointer; transition: color 0.2s; }
.dropdown__option[aria-selected="true"] { font-weight: 700; }
.dropdown__option:hover, .dropdown__option.is-focus { color: var(--color-brand); }
.dropdown__list:focus-visible .dropdown__option.is-focus { outline: 2px solid var(--color-brand); outline-offset: -2px; }

/* Search page: 1100px column (as live) */
.container--search { max-width: calc(1100px + 2 * var(--gutter)); }

/* Content tables styled as on www.4dinfra.com (editor: Table block > Advanced > Additional CSS class) */
.wp-block-table.is-links-table table { border: 1px solid var(--color-border); background: var(--color-white); }
.wp-block-table.is-links-table td { padding: 16px; border: 0; vertical-align: top; background: none; }
.wp-block-table.is-links-table tr { background: none; }
.wp-block-table.is-links-table td:first-child { width: 33%; }
.wp-block-table.is-links-table td > :is(h2, h3, h4) { margin: 20px 0 16px; font-size: 1.375rem; font-weight: 500; line-height: 1.23; }
.wp-block-table.is-links-table ul { margin: 24px 0; }
.wp-block-table.is-links-table li p { margin: 0; }
.wp-block-table.is-data-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wp-block-table.is-data-table table { min-width: 560px; border: 1px solid var(--color-border); background: var(--color-white); }
.wp-block-table.is-data-table td { padding: 7px; border: 0; line-height: 1.5; text-align: center; vertical-align: middle; }
.wp-block-table.is-data-table tr { background: none; }
.wp-block-table.is-data-table tr:first-child, .wp-block-table.is-data-table td:first-child { background: #edf2f4; }
.wp-block-table.is-data-table td:first-child { width: 50%; text-align: left; }
.wp-block-table.is-data-table td[colspan], .wp-block-table.is-data-table td:only-child { background: var(--color-brand); color: var(--color-white); font-weight: 700; text-align: left; }
@media (max-width: 767px) {
	.wp-block-table.is-links-table td { display: block; width: 100%; }
	.wp-block-table.is-links-table td:first-child { width: 100%; padding-bottom: 0; }
	.wp-block-table.is-links-table td > :is(h2, h3, h4) { margin: 0; }
	.wp-block-table.is-links-table ul { margin: 16px 0 8px; }
}

/* Desktop: the page dims while a main menu dropdown is open, as on www.4dinfra.com */
@media (min-width: 1224px) {
	body::after { content: ""; position: fixed; inset: 0; z-index: 99; background: rgba(0, 0, 0, 0.65); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.25s ease-in-out, visibility 0.25s ease-in-out; }
	body:has(.primary-nav__menu > .menu-item-has-children:is(:hover, :focus-within))::after { opacity: 1; visibility: visible; }
}
@media (prefers-reduced-motion: reduce) { body::after { transition: none; } }

/* Gravity Forms enquiry form, styled as the www.4dinfra.com enquiry form.
   Overrides the Gravity Forms "Orbital" theme (its CSS variables plus direct rules). */
.gform_wrapper.gform-theme--framework {
	--gf-color-primary: var(--color-brand);
	--gf-color-primary-rgb: 0, 175, 215;
	--gf-color-primary-contrast: #fff;
	--gf-color-primary-darker: #0095b8;
	--gf-color-primary-lighter: #33bfdf;
	--gf-color-in-ctrl-primary: var(--color-brand);
	--gf-ctrl-accent-color: var(--color-brand);
	--gf-ctrl-border-color: #e5e5e5;
	--gf-ctrl-label-color-primary: var(--color-brand);
	--gf-ctrl-label-color-secondary: #4c4c4c;
	--gf-form-gap-y: 28px;
	--gf-form-gap-x: 40px;
	font-family: var(--font-body);
}
.gform_wrapper.gform-theme--framework .gform_fields { row-gap: 28px; column-gap: 40px; }
.gform_wrapper.gform-theme--framework .gfield { margin: 0; }
.gform_wrapper .gfield_required { display: none; }
/* Field labels: small, spaced, uppercase, brand blue */
.gform_wrapper.gform-theme--framework .gfield_label,
.gform_wrapper.gform-theme--framework .gform-field-label:not(.gform-field-label--type-inline) { margin: 0 0 2px; color: var(--color-brand); font-family: var(--font-body); font-size: 0.75rem; font-weight: 400; line-height: 1.6; letter-spacing: 1.78px; text-transform: uppercase; }
/* Group headings ("I am enquiring about...", "Privacy") */
.gform_wrapper.gform-theme--framework legend.gfield_label.gform-field-label { margin: 0 0 12px; color: var(--color-brand); font-family: var(--font-heading); font-size: 1.5rem; font-weight: 500; line-height: 1.3; letter-spacing: 1.2px; text-transform: none; }
/* Text fields, selects and the message box: underline only */
.gform_wrapper.gform-theme--framework input:is([type="text"], [type="email"], [type="tel"], [type="number"], [type="url"]),
.gform_wrapper.gform-theme--framework select,
.gform_wrapper.gform-theme--framework textarea { width: 100%; min-height: 0; height: auto; padding: 8px 0; border: 0; border-bottom: 1px solid #e5e5e5; border-radius: 0; box-shadow: none; background-color: transparent; color: #000; font-family: var(--font-heading); font-size: 1.25rem; line-height: 1.2; transition: border-color 0.2s; }
.gform_wrapper.gform-theme--framework select { padding: 10px 32px 10px 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23282728' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 8px center; letter-spacing: 0.5px; appearance: none; cursor: pointer; }
.gform_wrapper.gform-theme--framework textarea { height: 132px; min-height: 132px; resize: vertical; }
.gform_wrapper.gform-theme--framework :is(input, select, textarea):focus { border-bottom-color: var(--color-brand); outline: 0; box-shadow: 0 1px 0 0 var(--color-brand); }
.gform_wrapper.gform-theme--framework .gfield_error :is(input, select, textarea) { border-bottom-color: #c02b0a; }
/* Checkboxes: square boxes, sentence-case labels as live */
.gform_wrapper.gform-theme--framework .gfield_checkbox { display: grid; gap: 14px; }
.gform_wrapper.gform-theme--framework .gchoice, .gform_wrapper.gform-theme--framework .ginput_container_consent { display: flex !important; align-items: center; gap: 12px !important; }
.gform_wrapper.gform-theme--framework input[type="checkbox"] { flex: 0 0 auto; width: 22px; height: 22px; margin: 0; border: 1px solid #b5b5b5; border-radius: 2px; background: #fff; accent-color: var(--color-brand); }
.gform_wrapper.gform-theme--framework input[type="checkbox"]:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.gform_wrapper.gform-theme--framework .gform-field-label--type-inline { margin: 0; color: #4c4c4c; font-family: var(--font-body); font-size: 0.875rem; font-weight: 400; line-height: 1.5; letter-spacing: 1px; text-transform: none; cursor: pointer; }
.gform_wrapper.gform-theme--framework .gfield_consent_label a { color: var(--color-brand); text-decoration: underline; }
/* Submit: brand pill button */
.gform_wrapper.gform-theme--framework .gform_footer { margin-top: 36px; padding: 0; }
.gform_wrapper.gform-theme--framework .gform_footer :is(input[type="submit"], .gform_button) { min-width: 140px !important; padding: 19px 40px !important; border: 2px solid var(--color-brand) !important; border-radius: var(--radius-pill) !important; background: var(--color-brand) !important; color: #fff !important; font-family: var(--font-body) !important; font-size: 1.125rem !important; font-weight: 500 !important; line-height: 1 !important; box-shadow: none !important; cursor: pointer !important; transition: background-color 0.2s, color 0.2s !important; }
.gform_wrapper.gform-theme--framework .gform_footer :is(input[type="submit"], .gform_button):is(:hover, :focus-visible) { background: #fff !important; color: var(--color-brand) !important; }
/* Errors and the thank-you message */
.gform_wrapper.gform-theme--framework .gform_validation_errors { margin: 0 0 28px; padding: 16px 20px; border: 1px solid #c02b0a; border-radius: 3px; background: #fff6f4; box-shadow: none; }
.gform_wrapper.gform-theme--framework .gform_validation_errors .gform_submission_error { color: #c02b0a; font-family: var(--font-body); font-size: 1rem; font-weight: 500; }
.gform_wrapper.gform-theme--framework .validation_message { margin-top: 6px; padding: 0; border: 0; background: none; color: #c02b0a; font-size: 0.875rem; }
.gform_confirmation_message { padding: 24px; border-left: 4px solid var(--color-brand); background: var(--color-grey-blue); font-size: 1.125rem; }
@media (max-width: 640px) {
	.gform_wrapper.gform-theme--framework .gform_fields { row-gap: 24px; }
	.gform_wrapper.gform-theme--framework .gform_footer :is(input[type="submit"], .gform_button) { width: 100% !important; }
}
