/*
Theme Name: Climalogik 2026
Theme URI: https://climalogik.ca/
Author: Climalogik Inc.
Author URI: https://climalogik.ca/
Description: Block theme for climalogik.ca. Brand colours, Poppins and Lato (self-hosted), and section styles that editors can apply from the block Styles panel. Works with the Climalogik Core plugin, which adds Projects, Insights listings, counters and forms.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
Version: 1.2.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: climalogik
*/

/* ---------- Base ---------- */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
:where(h1, h2, h3, h4) { text-wrap: balance; }
img { max-width: 100%; height: auto; }
.wp-site-blocks > * { margin-block-start: 0; }
.wp-site-blocks > main { margin-block: 0; }
.wp-block-post-content > .alignfull,
main > .alignfull { margin-block: 0; }
:focus-visible { outline: 3px solid var(--wp--preset--color--teal); outline-offset: 2px; }
.is-style-navy :focus-visible,
.cl-footer :focus-visible { outline-color: var(--wp--preset--color--gold); }
.screen-reader-text:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* ---------- Section rhythm ---------- */
.cl-section { padding-block: 80px; }
.cl-section.is-compact { padding-block: 56px; }
.cl-section.is-tight { padding-block: 40px; }
.cl-hero { padding-block: 56px 48px; }
.cl-hero.is-home { padding-block: 72px 80px; }
.cl-cta { padding-block: 56px; }
@media (max-width: 600px) {
	.cl-section { padding-block: 56px; }
	.cl-hero.is-home { padding-block: 48px 56px; }
}

/* ---------- Group styles (Styles panel) ---------- */
.is-style-navy { background: var(--wp--preset--color--navy); color: var(--wp--preset--color--white); }
.is-style-navy :where(h1, h2, h3, h4) { color: var(--wp--preset--color--white); }
.is-style-navy :where(p, li) { color: #D5DDEA; }
.is-style-navy a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--white); }
.is-style-navy a:where(:not(.wp-element-button)):hover { color: var(--wp--preset--color--gold); }
.is-style-panel { background: var(--wp--preset--color--panel); }
.is-style-soft { background: var(--wp--preset--color--panel-soft); }
.is-style-soft.alignfull { border-block: 1px solid var(--wp--preset--color--line); }
.is-style-teal { background: var(--wp--preset--color--teal-panel); }
.is-style-green { background: var(--wp--preset--color--green-panel); }
.is-style-orange { background: var(--wp--preset--color--orange-panel); }
.is-style-card { background: var(--wp--preset--color--white); border: 1px solid var(--wp--preset--color--line); border-radius: 6px; padding: 22px; }
.is-style-tile { background: var(--wp--preset--color--white); border-radius: 6px; padding: 18px 20px; }
.is-style-navy .is-style-tile { background: var(--wp--preset--color--navy-mid); border: 1px solid #3C5478; }
.is-style-placeholder { background: var(--wp--preset--color--panel); border: 2px dashed #9FB1C9; border-radius: 6px; padding: 28px; min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--wp--preset--color--muted); }
.is-style-navy .is-style-placeholder { background: var(--wp--preset--color--navy-mid); border-color: #6F86A8; }
.is-style-navy .is-style-placeholder :where(p) { color: #C9D3E3; }
.cl-box { border-radius: 6px; padding: 32px; }
@media (max-width: 600px) { .cl-box { padding: 22px; } }
.cl-top-teal { border-top: 4px solid var(--wp--preset--color--teal); }
.cl-top-green { border-top: 4px solid var(--wp--preset--color--green); }
.cl-top-orange { border-top: 4px solid var(--wp--preset--color--orange); }
.cl-top-navy { border-top: 4px solid var(--wp--preset--color--navy); }

/* ---------- Text ---------- */
.is-style-eyebrow,
.is-style-eyebrow-rule { font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wp--preset--color--teal); line-height: 1.4; }
.cl-hero .is-style-eyebrow, .cl-hero .is-style-eyebrow-rule { font-size: 15px; letter-spacing: 0.12em; text-wrap: balance; }
.is-style-eyebrow-rule { display: flex; align-items: center; gap: 14px; }
.is-style-eyebrow-rule::after { content: ""; flex: 1 1 auto; height: 1px; background: #C9D3E3; }
.is-style-navy :is(.is-style-eyebrow, .is-style-eyebrow-rule) { color: var(--wp--preset--color--gold); }
.is-style-navy .is-style-eyebrow-rule::after { background: #3C5478; }
.is-style-teal .is-style-eyebrow-rule::after { background: #A9CFDD; }
.is-style-orange .is-style-eyebrow-rule::after { background: #E9C9A8; }
.cl-lead { font-size: 19px; color: var(--wp--preset--color--slate); }
.is-layout-constrained > .cl-lead { max-width: 800px; margin-left: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important; margin-right: auto !important; }
.is-layout-constrained > .cl-lead:where(.has-text-align-center) { margin-left: auto !important; }
.is-style-navy .cl-lead { color: #D5DDEA; }
.cl-small { font-size: 16px; color: var(--wp--preset--color--slate); }
.cl-meta { font-size: 14px; color: var(--wp--preset--color--muted); }
.is-style-navy .cl-meta { color: #C9D3E3; }
.cl-label { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--muted); margin-bottom: 0; }
.cl-label + * { margin-block-start: 6px !important; }
.cl-title { font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 17px; color: var(--wp--preset--color--navy); line-height: 1.35; }
.cl-strap { font-family: var(--wp--preset--font-family--heading); font-weight: 500; font-size: 16px; color: var(--wp--preset--color--navy); }
.cl-statement { font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 22px; line-height: 1.35; color: var(--wp--preset--color--navy); }
.cl-placeholder-text { color: var(--wp--preset--color--orange); }
.cl-breadcrumb { font-size: 14px; }
.is-style-navy .cl-breadcrumb, .is-style-navy .cl-breadcrumb a { color: #C9D3E3; }
.cl-tight > * + * { margin-block-start: 6px !important; }
.cl-tight-sm > * + * { margin-block-start: 3px !important; }

/* ---------- Stats ---------- */
.cl-stat { border-top: 3px solid var(--wp--preset--color--teal); padding-top: 14px; }
.cl-stat > * { margin: 0; }
.cl-stat > * + * { margin-block-start: 4px; }
.cl-stat-num { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 44px; line-height: 1; color: var(--wp--preset--color--navy); }
.cl-stat-num.is-gold { color: var(--wp--preset--color--gold); font-size: 56px; }
.cl-stat-num.is-green { color: var(--wp--preset--color--green); font-size: 30px; }
.cl-stat-label { color: var(--wp--preset--color--muted); }
.cl-card-stat { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 26px; line-height: 1.1; color: var(--wp--preset--color--teal); }

/* ---------- Lists ---------- */
ul.cl-plain, ol.cl-plain { list-style: none; padding-left: 0; }
ul.cl-plain > li + li { margin-top: 4px; }
ul.cl-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
ul.cl-chips > li { margin: 0; background: var(--wp--preset--color--white); border: 1px solid #C9D3E3; border-radius: 6px; padding: 7px 13px; font-family: var(--wp--preset--font-family--heading); font-weight: 500; font-size: 14px; color: var(--wp--preset--color--navy); }
ul.cl-chips.is-panel > li { background: var(--wp--preset--color--panel); border-color: transparent; font-family: inherit; font-weight: 400; font-size: 15px; }
ul.cl-chips.is-teal > li { background: var(--wp--preset--color--teal-panel); border-color: transparent; }
.is-style-navy ul.cl-chips > li { background: var(--wp--preset--color--navy-mid); border-color: #3C5478; color: var(--wp--preset--color--white); font-family: inherit; font-weight: 400; font-size: 15px; }
ul.cl-jump { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
ul.cl-jump > li { margin: 0; }
ul.cl-jump a { display: inline-block; background: var(--wp--preset--color--navy-mid); color: var(--wp--preset--color--white); border: 1px solid #3C5478; border-radius: 6px; padding: 8px 14px; font-family: var(--wp--preset--font-family--heading); font-weight: 500; font-size: 14px; text-decoration: none; }
ul.cl-jump a:hover { border-color: var(--wp--preset--color--gold); color: var(--wp--preset--color--white); }
.is-style-soft ul.cl-jump a, .is-style-panel ul.cl-jump a { background: var(--wp--preset--color--white); color: var(--wp--preset--color--navy); border-color: var(--wp--preset--color--line); }
ol.cl-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); counter-reset: cl-step; }
ol.cl-steps > li { margin: 0; counter-increment: cl-step; border-top: 4px solid var(--wp--preset--color--teal); background: var(--wp--preset--color--teal-panel); border-radius: 6px; padding: 20px; }
ol.cl-steps > li::before { content: counter(cl-step); display: block; font-family: var(--wp--preset--font-family--heading); font-weight: 700; color: var(--wp--preset--color--teal); margin-bottom: 4px; }
ol.cl-steps > li strong { display: block; font-family: var(--wp--preset--font-family--heading); font-weight: 600; color: var(--wp--preset--color--navy); margin-bottom: 4px; }
ol.cl-steps.is-tricolour > li:nth-child(3n+2) { border-top-color: var(--wp--preset--color--green); background: var(--wp--preset--color--green-panel); }
ol.cl-steps.is-tricolour > li:nth-child(3n+2)::before { color: var(--wp--preset--color--green); }
ol.cl-steps.is-tricolour > li:nth-child(3n) { border-top-color: var(--wp--preset--color--orange); background: var(--wp--preset--color--orange-panel); }
ol.cl-steps.is-tricolour > li:nth-child(3n)::before { color: var(--wp--preset--color--orange); }
ol.cl-steps.is-white > li { background: var(--wp--preset--color--white); }
ol.cl-steps.is-compact { grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); }
ol.cl-steps.is-compact > li { padding: 18px; font-size: 16px; color: var(--wp--preset--color--slate); }

/* ---------- Link cards and cards ---------- */
.cl-linkcard { position: relative; border-top: 1px solid #A9CFDD; padding-top: 12px; }
.is-style-green .cl-linkcard { border-top-color: #A8D4B8; }
.cl-linkcard > * { margin: 0; }
.cl-linkcard > * + * { margin-block-start: 3px; }
.cl-linkcard a { color: var(--wp--preset--color--navy); text-decoration: none; font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 17px; }
.cl-linkcard a::after, .cl-clickable a::after { content: ""; position: absolute; inset: 0; }
.cl-linkcard:hover a, .cl-clickable:hover a { text-decoration: underline; }
.cl-linkcard p:last-child { font-size: 16px; color: var(--wp--preset--color--slate); }
.cl-clickable { position: relative; }
.cl-clickable a { text-decoration: none; }
.cl-card > *, .is-style-card > *, .is-style-tile > * { margin-block: 0; }
.is-style-card > * + *, .is-style-tile > * + * { margin-block-start: 8px; }
.cl-row { border-top: 1px solid #C9D3E3; padding-top: 24px; }
.cl-row.is-first { border-top: 2px solid var(--wp--preset--color--teal); }
.cl-row.is-first-green { border-top: 2px solid var(--wp--preset--color--green); }
.cl-row.is-first-orange { border-top: 2px solid var(--wp--preset--color--orange); }
.cl-row.is-first-navy { border-top: 2px solid var(--wp--preset--color--navy); }
.cl-row h3 { font-size: 21px; }
.cl-row h3 a { color: var(--wp--preset--color--navy); }
.cl-row > * > * { margin-block: 0; }
.cl-row > * > * + * { margin-block-start: 6px; }
.cl-person-photo { width: 112px; height: 112px; min-height: 0; padding: 8px; flex-shrink: 0; }
.cl-list-ruled > li { border-top: 1px solid var(--wp--preset--color--line); padding-top: 12px; margin-top: 12px; }

/* ---------- Buttons ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--wp--preset--color--navy); border: 2px solid currentColor; padding: 12px 20px; }
.is-style-navy .wp-block-button.is-style-outline > .wp-block-button__link { color: var(--wp--preset--color--white); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: rgba(255, 255, 255, 0.08); color: var(--wp--preset--color--gold); }
.wp-block-button.is-style-text > .wp-block-button__link { background: transparent; color: var(--wp--preset--color--navy); padding-inline: 4px; text-decoration: underline; text-underline-offset: 4px; }
.is-style-navy .wp-block-button.is-style-text > .wp-block-button__link { color: var(--wp--preset--color--white); }
.wp-block-button.is-style-navy > .wp-block-button__link { background: var(--wp--preset--color--navy); color: var(--wp--preset--color--white); }

/* ---------- Header ---------- */
.cl-header { background: var(--wp--preset--color--white); border-bottom: 1px solid var(--wp--preset--color--line); }
.cl-header__bar { padding-block: 18px; row-gap: 16px; column-gap: 24px; }
.cl-header .wp-block-site-logo img, .cl-header .cl-logo img { height: 66px; width: auto; }
.cl-header .wp-block-navigation { gap: 6px 22px; }
.cl-header .wp-block-navigation a { color: var(--wp--preset--color--navy); text-decoration: none; }
.cl-header .wp-block-navigation a:hover { text-decoration: underline; text-underline-offset: 5px; }
.cl-section h2 a, .cl-section h3 a, .cl-box h3 a { text-decoration: none; }
.cl-section h2 a:hover, .cl-section h3 a:hover, .cl-box h3 a:hover { text-decoration: underline; text-underline-offset: 5px; }
.cl-header .wp-block-navigation a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--wp--preset--color--gold); }
.cl-header .wp-block-button__link { padding: 11px 18px; font-size: 15px; }
.cl-header__nav { column-gap: 22px; row-gap: 10px; }
@media (max-width: 600px) { .cl-header .wp-block-site-logo img, .cl-header .cl-logo img { height: 52px; } }

/* ---------- Footer ---------- */
.cl-footer { background: var(--wp--preset--color--navy); color: #D5DDEA; padding-block: 48px 32px; }
.cl-footer :where(p) { color: #D5DDEA; margin: 0; }
.cl-footer a { color: var(--wp--preset--color--white); }
.cl-footer .wp-block-navigation a { color: var(--wp--preset--color--white); text-decoration: underline; text-underline-offset: 3px; }
.cl-footer .wp-block-navigation { font-family: inherit; font-weight: 400; font-size: 16px; gap: 8px 22px; }
.cl-footer__brand-name { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 18px; color: var(--wp--preset--color--white) !important; }
.cl-footer__bottom { border-top: 1px solid #3C5478; padding-top: 18px; font-size: 14px; }
.cl-footer__bottom a { color: #D5DDEA; }

/* ---------- Article (Insights) ---------- */
.cl-article { padding-block: 56px 72px; }
.cl-article .wp-block-post-content > * + * { margin-block-start: 1.1em; }
.cl-article .wp-block-post-content h2 { font-size: 26px; margin-block-start: 1.6em; }
.cl-article .wp-block-post-content p, .cl-article .wp-block-post-content li { font-size: 18px; line-height: 1.65; }
.cl-callout { background: var(--wp--preset--color--teal-panel); border-radius: 6px; padding: 24px 28px; }
.cl-callout h2 { margin-block-start: 0 !important; font-size: 22px !important; }

/* ---------- Quote (RFP clause) ---------- */
.wp-block-quote.cl-rfp { background: var(--wp--preset--color--white); border-left: 4px solid var(--wp--preset--color--orange); border-radius: 6px; padding: 24px; margin: 0; font-size: 16px; }

/* ---------- Images ---------- */
.wp-block-image.cl-figure img { border: 1px solid var(--wp--preset--color--line); border-radius: 6px; }

/* ---------- Print ---------- */
@media print {
	.cl-header .wp-block-navigation, .cl-header .wp-block-buttons, .cl-footer, .cl-cta { display: none; }
	.is-style-navy { background: none; color: #000; }
	.is-style-navy :where(h1, h2, h3, p, li) { color: #000; }
}

/* ---------- Call to action band ---------- */
.cl-cta h2 { font-size: clamp(28px, 3vw, 38px); }
.cl-cta__text { max-width: 720px; }
.cl-list-item { border-bottom: 1px solid var(--wp--preset--color--line); padding-block: 18px; }
.cl-list-item > * { margin-block: 0; }
.cl-list-item > * + * { margin-block-start: 6px; }
.cl-list-item .wp-block-post-title a { color: var(--wp--preset--color--navy); text-decoration: none; }
.cl-list-item .wp-block-post-title a:hover { text-decoration: underline; }

/* ---------- Page-specific helpers ---------- */
.is-style-navy .cl-title, .is-style-navy .cl-title a { color: var(--wp--preset--color--white); }
.cl-proof { font-size: 14px; font-weight: 700; color: var(--wp--preset--color--teal); }
.cl-practice-title { font-size: 26px; }
.cl-hero-figure.is-style-placeholder { min-height: 380px; }
.cl-hero-grid .wp-block-image { margin: 0; }
/* Section pictures: a banner strip at the top of a section, card or audience block. */
.cl-section-figure { margin: 0 0 22px; }
.cl-section-figure img { display: block; width: 100%; height: 240px; object-fit: cover; border-radius: 6px; }
.cl-box > .cl-section-figure { margin: -6px 0 16px; }
.cl-box > .cl-section-figure img { height: 190px; }
.is-style-navy .cl-section-figure { margin-top: 24px; }
@media (max-width: 600px) { .cl-section-figure img { height: 160px; } }
.cl-hero-grid .wp-block-image img { display: block; width: 100%; height: auto; border-radius: 6px; }
.cl-person { gap: 20px; }
.cl-person-photo p { font-size: 13px; margin: 0; }
.cl-tile-teal { background: var(--wp--preset--color--teal-panel); }
ul.cl-checks { list-style: none; padding-left: 0; }
ul.cl-checks > li { position: relative; padding-left: 28px; margin-bottom: 10px; }
ul.cl-checks > li::before { content: ""; position: absolute; left: 2px; top: 0.45em; width: 14px; height: 8px; border-left: 3px solid var(--wp--preset--color--green); border-bottom: 3px solid var(--wp--preset--color--green); transform: rotate(-45deg); }
.cl-audience + .cl-audience { margin-block-start: 40px; }
.cl-audience h2 { font-size: 26px; }
.cl-audience .cl-label { margin-block-start: 0; }
.cl-qa { border-top: 1px solid var(--wp--preset--color--line); padding-top: 12px; }
.cl-qa > p { margin: 0; }
ol.cl-pubs { padding-left: 22px; }
ol.cl-pubs > li { margin-bottom: 12px; font-size: 16px; }
ul.cl-news > li { display: grid; grid-template-columns: minmax(120px, 160px) 1fr; gap: 16px; border-top: 1px solid var(--wp--preset--color--line); padding-block: 12px; margin: 0; }
ul.cl-news > li strong { font-weight: 700; color: var(--wp--preset--color--navy); }
@media (max-width: 600px) { ul.cl-news > li { grid-template-columns: 1fr; gap: 2px; } }
ol.cl-steps.is-stacked { grid-template-columns: 1fr; }
ol.cl-steps.is-stacked > li { padding: 14px 18px; }
.cl-policies h2 { font-size: 28px; }
.cl-policies > .wp-block-group + .wp-block-group { margin-block-start: 40px; }
.cl-impact { border-bottom: 1px solid var(--wp--preset--color--line); }
.cl-impact .cl-strap { margin-block-start: 22px; }
.cl-figure-placeholder { min-height: 420px; }
.cl-story h2 { font-size: 26px; }
.cl-story .wp-block-column > h2:not(:first-child) { margin-block-start: 40px; }
.cl-story .wp-block-column:last-child > * + * { margin-block-start: 24px; }

/* ---------- Contrast: small coloured text on tinted panels stays above 4.5:1 ---------- */
:is(.is-style-eyebrow, .is-style-eyebrow-rule).has-green-color { color: #166B37 !important; }
:is(.is-style-eyebrow, .is-style-eyebrow-rule).has-orange-color { color: #964A0E !important; }
.cl-placeholder-text { color: #964A0E; }

/* ---------- Layout safety when unfinished items are hidden from visitors ---------- */
.cl-split:has(> :only-child) { grid-template-columns: 1fr !important; }
.cl-split:has(> :only-child) .cl-lead { max-width: 800px; }
.is-home .cl-split:has(> :only-child) h1 { max-width: 900px; }
.cl-h3 { font-size: 22px; line-height: 1.3; font-weight: 600; }
:is(h2, h3).is-style-eyebrow, :is(h2, h3).is-style-eyebrow-rule { margin-block-end: 0; }
.cl-story .wp-block-column > :first-child { margin-block-start: 0; }
.cl-pubs a, .cl-list-ruled a, .cl-box a, .wp-block-post-content li a { overflow-wrap: anywhere; }
.cl-map-card { align-self: start; }
.cl-autofit { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)) !important; }

/* ---------- Phones: smaller sub-headings so they sit below the section heading ---------- */
@media (max-width: 600px) {
	.cl-practice-title, .cl-audience h2, .cl-story h2, .cl-article .wp-block-post-content h2 { font-size: 22px; }
}

/* ---------- Cards stand out from white and pale backgrounds ---------- */
.is-style-card, .cl-pcard, .cl-fcard { border-color: #C3CEDD; box-shadow: 0 1px 2px rgba(18, 42, 76, 0.06), 0 6px 18px rgba(18, 42, 76, 0.08); }
.is-style-card.cl-top-teal { border-top: 4px solid var(--wp--preset--color--teal); }
.is-style-card.cl-top-green { border-top: 4px solid var(--wp--preset--color--green); }
.is-style-card.cl-top-orange { border-top: 4px solid var(--wp--preset--color--orange); }
.is-style-card.cl-top-navy { border-top: 4px solid var(--wp--preset--color--navy); }
:is(.is-style-soft, .is-style-panel) .is-style-tile { box-shadow: 0 1px 2px rgba(18, 42, 76, 0.06), 0 4px 12px rgba(18, 42, 76, 0.07); border: 1px solid #D3DCE8; }

/* ---------- Leadership photos ---------- */
.wp-block-image.cl-person-photo { width: 112px; height: 112px; padding: 0; margin: 0; flex-shrink: 0; }
.wp-block-image.cl-person-photo img { width: 112px; height: 112px; object-fit: cover; object-position: 50% 28%; border-radius: 6px; display: block; }

/* ---------- Footer logo ---------- */
.cl-footer__logo { margin: 0; }
.cl-footer__logo img { width: 220px; height: auto; display: block; }

/* ---------- Computers and tablets: each page opens on its photo too (4 October 2026 phone design, extended) ---------- */
@media (min-width: 601px) {
	body.cl-photo-hero :is(main > .cl-hero:first-child, main > .wp-block-post-content > .cl-hero:first-child) { position: relative; isolation: isolate; }
	body.cl-photo-hero :is(main > .cl-hero:first-child, main > .wp-block-post-content > .cl-hero:first-child)::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14, 34, 64, 0.97) 0%, rgba(14, 34, 64, 0.92) 38%, rgba(14, 34, 64, 0.68) 64%, rgba(14, 34, 64, 0.5) 100%), var(--cl-photo) 50% 40% / cover no-repeat; }
	/* Home: the photo fills most of the first screen; the side figure stays hidden so the photo shows. */
	body.cl-photo-hero main > .wp-block-post-content > .cl-hero.is-home { min-height: 66vh; display: flex; flex-direction: column; justify-content: center; }
	body.cl-photo-hero main > .wp-block-post-content > .cl-hero.is-home::before { background: linear-gradient(90deg, rgba(14, 34, 64, 0.94) 0%, rgba(14, 34, 64, 0.84) 40%, rgba(14, 34, 64, 0.38) 74%, rgba(14, 34, 64, 0.28) 100%), var(--cl-photo) 50% 45% / cover no-repeat; }
	body.cl-photo-hero .cl-hero.is-home .cl-hero-figure { display: none; }
	body.cl-photo-hero .cl-hero.is-home .cl-hero-grid > :first-child { grid-column: 1 / -1; max-width: 700px; }
	/* Insights articles: a photo band above the article. */
	body.cl-photo-hero.single-post main::before { content: ""; display: block; height: 260px; background: linear-gradient(180deg, rgba(14, 34, 64, 0.55) 0, rgba(14, 34, 64, 0.12) 60%, rgba(14, 34, 64, 0) 100%), var(--cl-photo) 50% 45% / cover no-repeat, var(--wp--preset--color--navy); }
}

/* ---------- Phone header and menu (computers keep the full header above 900px) ---------- */
.cl-mbar, .cl-mmenu { display: none; }
.cl-row__toggle, .cl-filters__toggle { display: none; }
/* Slim header and full-screen menu: phones, tablets and small laptops (the full header needs about 900px). */
@media (max-width: 900px) {
	.wp-site-blocks > header { display: none; }
	.cl-mbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 64px; padding: 0 20px; box-sizing: border-box; color: var(--wp--preset--color--white); transition: background-color 0.2s, box-shadow 0.2s; }
	body.admin-bar .cl-mbar { top: 46px; }
	body.admin-bar .cl-mbar.is-solid { top: 0; }
	.cl-mbar__logo { display: block; line-height: 0; }
	.cl-mbar__logo img { height: 40px; width: auto; display: block; }
	.cl-mbar__btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid currentColor; background: transparent; color: inherit; font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 15px; line-height: 1; cursor: pointer; }
	.cl-mbar__btn svg { width: 18px; height: 18px; }
	.cl-mmenu { position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; padding: 0 20px 28px; overflow-y: auto; background: var(--wp--preset--color--navy); color: var(--wp--preset--color--white); }
	.cl-mmenu[hidden] { display: none; }
	html.cl-menu-open { overflow: hidden; }
	.cl-mmenu__top { display: flex; align-items: center; justify-content: space-between; height: 64px; flex-shrink: 0; }
	.cl-mmenu nav { display: flex; flex-direction: column; margin-top: 12px; }
	.cl-mmenu nav a { color: var(--wp--preset--color--white); text-decoration: none; font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 24px; line-height: 1.2; padding: 14px 0; border-bottom: 1px solid #2E4670; }
	.cl-mmenu nav a[aria-current="page"] { color: var(--wp--preset--color--gold); }
	.cl-mmenu .cl-mmenu__cta { display: block; margin-top: 28px; padding: 17px 20px; border-radius: 6px; text-align: center; background: var(--wp--preset--color--gold); color: var(--wp--preset--color--navy); text-decoration: none; font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 17px; line-height: 1; }
	.cl-mmenu__contact { margin: 22px 0 0; color: #C9D3E3; font-size: 15px; line-height: 1.7; }
	.cl-mmenu__contact a { color: var(--wp--preset--color--white); }
}

/* Tablets and small laptops: no photo hero, so the bar is always solid and the page starts below it. */
@media (min-width: 601px) and (max-width: 900px) {
	.cl-mbar { background: var(--wp--preset--color--navy); box-shadow: 0 1px 0 #2E4670; }
	.wp-site-blocks { padding-top: 64px; }
	.cl-mmenu nav a { font-size: 22px; }
}
@media (min-width: 783px) and (max-width: 900px) {
	body.admin-bar .cl-mbar { top: 32px; }
	body.admin-bar .cl-mbar.is-solid { top: 32px; }
}

@media (max-width: 600px) {
	body:not(.cl-photo-hero) .cl-mbar, .cl-mbar.is-solid { background: var(--wp--preset--color--navy); box-shadow: 0 1px 0 #2E4670; }
	body:not(.cl-photo-hero) .wp-site-blocks { padding-top: 64px; }

	/* Each page opens on its own photo, with the title over it. */
	body.cl-photo-hero :is(main > .cl-hero:first-child, main > .wp-block-post-content > .cl-hero:first-child) { --cl-photo-h: max(230px, 36svh); position: relative; isolation: isolate; padding-top: var(--cl-photo-h); }
	body.cl-photo-hero :is(main > .cl-hero:first-child, main > .wp-block-post-content > .cl-hero:first-child)::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: calc(var(--cl-photo-h) + 150px); z-index: -1; background: linear-gradient(180deg, rgba(14, 34, 64, 0.72) 0, rgba(14, 34, 64, 0.08) 96px, rgba(14, 34, 64, 0.2) 52%, rgba(18, 42, 76, 0.95) 84%, var(--wp--preset--color--navy) 100%), var(--cl-photo) 50% 40% / cover no-repeat; }

	/* Insights articles: a photo band above the article. */
	body.cl-photo-hero.single-post main::before { content: ""; display: block; height: max(220px, 32svh); background: linear-gradient(180deg, rgba(14, 34, 64, 0.72) 0, rgba(14, 34, 64, 0.1) 96px, rgba(14, 34, 64, 0) 70%), var(--cl-photo) 50% 45% / cover no-repeat, var(--wp--preset--color--navy); }

	/* Home: the photo fills the first screen. */
	body.cl-photo-hero main > .wp-block-post-content > .cl-hero.is-home { min-height: 100svh; box-sizing: border-box; display: flex; flex-direction: column; justify-content: flex-end; padding-top: 96px; padding-bottom: 36px; background: linear-gradient(180deg, rgba(18, 39, 74, 0.7) 0%, rgba(18, 39, 74, 0.1) 26%, rgba(18, 39, 74, 0.3) 48%, rgba(18, 39, 74, 0.92) 78%, #14294D 100%), var(--cl-photo) 50% 50% / cover no-repeat, var(--wp--preset--color--navy); }
	body.cl-photo-hero main > .wp-block-post-content > .cl-hero.is-home::before { content: none; }
	body.cl-photo-hero main > .wp-block-post-content > .cl-hero.is-home > * { margin-left: 0 !important; margin-right: 0 !important; width: 100%; max-width: none; }
	body.admin-bar.cl-photo-hero main > .wp-block-post-content > .cl-hero.is-home { min-height: calc(100svh - 46px); }
	.cl-hero.is-home .cl-hero-figure, .cl-hero.is-home .cl-more { display: none; }
	.cl-hero.is-home .is-style-eyebrow { font-size: 13px; letter-spacing: 0.08em; margin-bottom: 14px; }
	.cl-hero.is-home h1 { font-size: 34px; line-height: 1.1; margin-top: 0; }
	.cl-hero.is-home .cl-lead { font-size: 17px; line-height: 1.5; margin-top: 14px; color: #EEF2F8; }
	.cl-hero.is-home .wp-block-buttons { flex-direction: column; align-items: stretch; gap: 6px; margin-top: 22px; }
	.cl-hero.is-home .wp-block-button:not(.is-style-outline) .wp-block-button__link { display: block; width: 100%; text-align: center; padding: 16px 20px; font-size: 16px; }
	.cl-hero.is-home .wp-block-button.is-style-outline .wp-block-button__link { background: none; border: 0; padding: 10px 0; text-align: center; text-decoration: underline; text-underline-offset: 4px; color: var(--wp--preset--color--white); }

	/* Jump links: one row that scrolls sideways. */
	ul.cl-jump { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--wp--style--root--padding-left) * -1) calc(var(--wp--style--root--padding-right) * -1) !important; padding-inline: var(--wp--style--root--padding-left) var(--wp--style--root--padding-right); padding-bottom: 4px; max-width: none !important; }
	ul.cl-jump::-webkit-scrollbar { display: none; }
	ul.cl-jump { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
	ul.cl-jump > li { flex: 0 0 auto; }
	ul.cl-jump a { white-space: nowrap; font-size: 15px; }

	/* Services: details open on tap. */
	.cl-row.is-folded:not(.is-open) > .cl-row__detail { display: none; }
	.cl-row__toggle { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px !important; padding: 8px 0; border: 0; background: none; color: var(--wp--preset--color--teal); font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 15px; cursor: pointer; }
	.cl-row__toggle svg { width: 18px; height: 18px; transition: transform 0.2s; }
	.cl-row.is-open .cl-row__toggle svg { transform: rotate(180deg); }
	.cl-row { padding-top: 18px; row-gap: 14px; }

	/* Projects: filters behind one button. */
	.cl-filters.is-folded:not(.is-open) { display: none !important; }
	.cl-filters__toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 0 16px; border: 1px solid #9FB1C9; border-radius: 6px; background: var(--wp--preset--color--white); color: var(--wp--preset--color--navy); font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 16px; cursor: pointer; }
	.cl-filters__toggle svg { width: 20px; height: 20px; transition: transform 0.2s; }
	.cl-filters__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

	/* About: photo above the bio, so the text keeps the full width. */
	.cl-person { flex-wrap: wrap !important; row-gap: 14px; }

	/* Small labels read more easily. */
	.cl-label, dt, .cl-proof, .cl-meta, .cl-form__note, .cl-breadcrumb, ul.cl-chips > li, .cl-chip { font-size: 15px; }
	.cl-latest__meta, .cl-post__meta { font-size: 13.5px; }
	.cl-latest__title, .cl-post__title { font-size: 19px; }
	.cl-post.is-featured .cl-post__title { font-size: 22px; }
	.cl-badge { font-size: 13px; }
}

/* ---------- Low Carbon Resilience cards: status always sits under the municipality name ---------- */
.cl-lcr-card .cl-lcr-card__head { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px; }

/* ---------- 1.1.6 and 1.1.7: card type scale. In cards, tiles, boxes and Q&A, the text sits visibly below the title ---------- */
.cl-small { font-size: 15px; }
:where(.is-style-tile, .is-style-card, .cl-box, .cl-qa, .is-style-placeholder) .cl-title { font-size: 19px; line-height: 1.3; }
:where(.is-style-tile, .is-style-card, .cl-box, .cl-qa) :where(p, li):where(:not(.cl-title, .cl-label, .cl-meta, .cl-proof, .cl-badge, .cl-stat-num, .cl-card-stat, .cl-strap, .cl-statement, .cl-lead, .cl-map-pop__head)) { font-size: 15px; line-height: 1.55; }
.cl-linkcard a { font-size: 19px; line-height: 1.3; }
.cl-linkcard p:last-child { font-size: 15px; }
.cl-row p { font-size: 15px; }
.cl-callout :where(p, li), .cl-article .wp-block-post-content .cl-callout :is(p, li) { font-size: 16px; line-height: 1.6; }

/* ---------- 1.1.8: section labels (the "eyebrow with rule" style) are navy, led by a short gold bar, so they stand apart from the teal and green labels inside cards ---------- */
.is-style-eyebrow-rule { color: var(--wp--preset--color--navy); font-weight: 700; }
.is-style-eyebrow-rule::before { content: ""; flex: 0 0 32px; height: 3px; border-radius: 2px; background: var(--wp--preset--color--gold); }
.is-style-eyebrow-rule.has-text-color::before { background: currentColor; }
.is-style-navy .is-style-eyebrow-rule { color: var(--wp--preset--color--gold); }

/* ---------- 1.1.9: home hero on tablets. The text block spans the full content width (its side picture is hidden from 601px up), so the page no longer scrolls sideways between about 600 and 1130px, and the hero text lines up with the logo and the sections below ---------- */
@media (min-width: 601px) {
	body.cl-photo-hero .cl-hero.is-home .cl-hero-grid { width: 100%; grid-template-columns: 1fr; }
}

/* ---------- 1.2.0: review fixes (9 Oct 2026) ---------- */
/* Figure captions inside navy sections (the service-page heroes) were grey on navy and hard to read. */
.is-style-navy :is(figcaption, .wp-element-caption) { color: #C9D3E3; }
/* Search results: pages and projects show no publish date (a project's date is when it was added to the site, not when the work was done). */
.search :is(.type-page, .type-project) .wp-block-post-date { display: none; }
