/* ==========================================================
   Climate Governance Initiative Mauritius — design system
   Extracted from the approved v2 mockups (czm-home / czm-resources).
   ========================================================== */
/* ==========================================================
   MIoD design system: shared tokens and components.
   Source of truth for every mockup page and the design kit.
   Each :root token maps to an Elementor Global Colour or Global Font.
   ========================================================== */
:root {
  /* Brand colours (MIoD palette, 2021 web design system) */
  --colour-primary: #002741;      /* Prussian Blue: hero, footer, dark bands, headings */
  --colour-secondary: #00778D;    /* Teal Blue: buttons, links, eyebrows */
  --colour-accent: #05A2CE;       /* Cerulean: highlights on dark surfaces only */
  --colour-sky: #72D9F7;          /* Sky Blue: eyebrows and figures on dark */
  --colour-signature: #FF3A18;    /* Red RYB: decorative diamond marks only, never text */
  --colour-surface: #FCFFFC;      /* Baby Powder: page background */
  --colour-surface-alt: #EEF3F5;  /* Cool mist: alternating sections, cards on white */
  --colour-surface-dark: #0B3A57; /* Raised panels on Prussian */
  --colour-line: #D5DEE4;         /* Hairlines and card borders */
  --colour-text: #252525;         /* Raisin Black: body copy */
  --colour-text-muted: #55606B;   /* Secondary copy */
  --colour-on-dark-muted: #B8C7D3;/* Secondary copy on Prussian */
  --colour-required: #D92D20;     /* Required-field asterisks */

  /* Fonts: Adobe Fonts web project zds8vab (ff-dax-pro, myriad-pro) */
  --font-heading: 'ff-dax-pro', 'Dax', sans-serif;
  --font-body: 'myriad-pro', 'Myriad Pro', sans-serif;

  /* Shape and rhythm */
  --space: 8px;
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --radius-pill: 999px;
  --container: 1240px;
  --gutter: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Lock page scroll while any popup (profile, gallery lightbox) is open; stable gutter avoids a layout jump */
html { scrollbar-gutter: stable; }
html:has(dialog[open]) { overflow: hidden; }
dialog { overscroll-behavior: contain; }
body { font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; color: var(--colour-text); background: var(--colour-surface); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--colour-secondary); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--colour-accent); outline-offset: 3px; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--colour-primary); color: #fff; padding: 10px 18px; border-radius: var(--radius-pill); z-index: 100; }
.skip-link:focus { left: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Typography → Elementor Global Fonts ---------- */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; color: var(--colour-primary); }
/* Balanced headings: lines share the width evenly (no short orphan last line) on every title site-wide */
h1, h2, h3, h4, .slide-title, .purpose-statement { text-wrap: balance; }
.lead, .slide-text { text-wrap: pretty; }
h1 { font-size: clamp(2.5rem, 3.6vw + 1rem, 4rem); line-height: 1.05; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.875rem, 2.2vw + 1rem, 3rem); line-height: 1.1; letter-spacing: -0.02em; }
h3 { font-size: clamp(1.25rem, 0.6vw + 1rem, 1.5rem); line-height: 1.25; letter-spacing: -0.01em; }
h4 { font-size: 1.125rem; line-height: 1.3; }
p + p { margin-top: 1em; }
.lead { font-size: clamp(1.125rem, 0.4vw + 1rem, 1.3125rem); line-height: 1.55; color: var(--colour-text-muted); max-width: 60ch; }
.muted { color: var(--colour-text-muted); }

/* Eyebrow with the signature red diamond (from the logo mark) → Icon List widget, custom SVG icon */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-body); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--colour-secondary); margin-bottom: calc(var(--space) * 2.5); }
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--colour-signature); transform: rotate(45deg); flex: none; }
.on-dark .eyebrow { color: var(--colour-sky); }

/* ---------- Layout → Flexbox Containers ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section, .section-tight { padding: 0; }                     /* white sections carry no padding: spacing comes from the section rhythm below */
/* Section rhythm: one consistent gap between consecutive blocks on every page (64 / 56 / 48px) */
main > * + * { margin-top: 64px; }
main { padding-bottom: 64px; }
/* Coloured panels keep generous inner padding */
.section.section-alt, .panel.section { padding: 80px 0; }
.section-alt.section-tight, .panel.section-tight { padding: 56px 0; }
.section-alt { background: var(--colour-surface-alt); margin-left: 16px; margin-right: 16px; border-radius: var(--radius-lg); } /* coloured bands are always inset panels, never full-bleed strips */
/* Consecutive coloured blocks: one 16px gutter, same as the side gutters */
.inset { padding: 0 16px; }                                  /* page gutter around rounded panels */
.panel { border-radius: var(--radius-lg); overflow: hidden; }
.panel-dark { background: var(--colour-primary); color: #fff; }
.panel-alt { background: var(--colour-surface-alt); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: #fff; }
.on-dark .lead, .on-dark .muted { color: var(--colour-on-dark-muted); }

.row { display: flex; flex-wrap: wrap; gap: calc(var(--space) * 3); }
.row > * { flex: 1 1 280px; }
.split { display: flex; flex-wrap: wrap; gap: calc(var(--space) * 8); align-items: center; }
.split > * { flex: 1 1 420px; }
.section-head { display: flex; flex-wrap: wrap; gap: calc(var(--space) * 4); justify-content: space-between; align-items: flex-end; margin-bottom: calc(var(--space) * 7); }
.section-head > div { max-width: 640px; }
.section-head h2 { margin-bottom: 0; }
.section-head .lead { margin-top: calc(var(--space) * 2); }

/* ---------- Buttons → Button widget ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: 12px; font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1; padding: 16px 28px; border-radius: var(--radius-pill); background: var(--colour-secondary); color: #fff; text-decoration: none; border: 1.5px solid var(--colour-secondary); cursor: pointer; transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease); }
.btn svg { width: 16px; height: 16px; transition: transform .35s var(--ease); }
.btn:hover { background: var(--colour-primary); border-color: var(--colour-primary); }
.btn:hover svg { transform: translateX(3px); }
.btn-outline { background: transparent; color: var(--colour-primary); border-color: var(--colour-primary); }
.btn-outline:hover { background: var(--colour-primary); color: #fff; }
.btn-light { background: #fff; color: var(--colour-primary); border-color: #fff; }
.btn-light:hover { background: var(--colour-sky); border-color: var(--colour-sky); color: var(--colour-primary); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-ghost-light:hover { background: #fff; color: var(--colour-primary); border-color: #fff; }
.btn-sm { padding: 12px 20px; font-size: .9375rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--colour-secondary); text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }
.text-link:hover { color: var(--colour-primary); }
.on-dark .text-link { color: var(--colour-sky); }
.card .text-link { align-self: flex-start; } /* underline hugs the label inside cards */

/* ---------- Cards (bordered, no shadow) → nested Container ---------- */
.card { background: var(--colour-surface); border: 1px solid var(--colour-line); border-radius: var(--radius); padding: calc(var(--space) * 4); transition: border-color .35s var(--ease), transform .35s var(--ease); }
a.card, .card-link { text-decoration: none; color: inherit; display: block; }
a.card:hover, .card-link:hover { border-color: var(--colour-secondary); transform: translateY(-4px); }
:where(.section-alt) .card { background: #fff; } /* low specificity so dark card variants win */
.card h3 { margin-bottom: calc(var(--space) * 1.5); }
.card-num { font-family: var(--font-heading); font-size: .9375rem; font-weight: 600; color: var(--colour-secondary); letter-spacing: .04em; margin-bottom: calc(var(--space) * 4); display: block; }
.media { border-radius: var(--radius); overflow: hidden; background: var(--colour-surface-alt); }
.media img { width: 100%; height: 100%; object-fit: cover; }

/* Tag / chip → Button widget (small) or Icon List */
.tag { display: inline-flex; align-items: center; font-size: .8125rem; font-weight: 600; letter-spacing: .04em; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--colour-surface-alt); color: var(--colour-primary); }
.tag-teal { background: rgba(0,119,141,.1); color: var(--colour-secondary); }
.on-dark .tag { background: rgba(255,255,255,.1); color: #fff; }

/* Check list → Icon List widget */
.checklist { list-style: none; display: grid; gap: 14px; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 8px; height: 8px; border: 2px solid var(--colour-secondary); transform: rotate(45deg); }

/* ---------- Form fields → Elementor Pro Form / JetFormBuilder: radius 12, border 1px #D5DEE4, padding 14/16 ---------- */
.form-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.field { flex: 1 1 calc(50% - 10px); min-width: 220px; display: flex; flex-direction: column; gap: 8px; }
.field.full { flex-basis: 100%; }
.field.third { flex: 1 1 calc(33.333% - 14px); min-width: 180px; }
.field label, .field legend { font-size: .9375rem; font-weight: 600; color: var(--colour-primary); }
.field label span { color: var(--colour-text-muted); font-weight: 400; }
.field .req { color: var(--colour-required); font-weight: 700; }
.field input, .field select, .field textarea { font: inherit; font-size: 1rem; color: var(--colour-text); width: 100%; padding: 14px 16px; border: 1px solid var(--colour-line); border-radius: var(--radius-sm); background: var(--colour-surface); transition: border-color .3s var(--ease), background .3s var(--ease); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #A9B8C3; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--colour-secondary); background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(5,162,206,.25); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300778D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 16px; padding-right: 44px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .9375rem; color: var(--colour-text-muted); }
.consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--colour-secondary); flex: none; }

/* ---------- Page hero (inner pages) → Container, bg colour, radius 32 ---------- */
/* Inner-page banner: full width, directly under the header, no gap or radius */
.hero-full { margin: 0; }
.page-hero { position: relative; overflow: hidden; color: #fff; padding: calc(var(--space) * 10) 0 calc(var(--space) * 9); background: var(--colour-primary) url('assets/miod-mark-outline.svg') no-repeat right -80px center / 520px auto; }
.page-hero .container { position: relative; }
.page-hero h1 { max-width: 24ch; } /* two balanced lines for most titles */
.page-hero .lead { margin-top: calc(var(--space) * 3); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; font-size: .875rem; color: var(--colour-on-dark-muted); margin-bottom: calc(var(--space) * 4); }
.breadcrumb a { color: var(--colour-on-dark-muted); text-decoration: none; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; opacity: .5; }

/* ---------- Closing CTA rule ----------
   The last block before the footer is never dark: a dark panel there would merge visually with the dark footer.
   Any on-dark panel in the final section switches to the light Surface alt treatment. */
main > section:last-child .panel.on-dark { background: var(--colour-surface-alt); color: var(--colour-text); border: 0; }
main > section:last-child .panel.on-dark h2, main > section:last-child .panel.on-dark h3, main > section:last-child .panel.on-dark strong { color: var(--colour-primary); }
main > section:last-child .panel.on-dark p, main > section:last-child .panel.on-dark .muted, main > section:last-child .panel.on-dark .lead { color: var(--colour-text-muted); }
main > section:last-child .panel.on-dark .eyebrow { color: var(--colour-secondary); }
main > section:last-child .panel.on-dark a:not(.btn) { color: var(--colour-secondary); }
main > section:last-child .panel.on-dark .btn-light { background: var(--colour-secondary); border-color: var(--colour-secondary); color: #fff; }
main > section:last-child .panel.on-dark .btn-light:hover { background: var(--colour-primary); border-color: var(--colour-primary); }
main > section:last-child .panel.on-dark .btn-ghost-light { background: transparent; border-color: var(--colour-primary); color: var(--colour-primary); }
main > section:last-child .panel.on-dark .btn-ghost-light:hover { background: var(--colour-primary); color: #fff; }


/* Closing zone: the final CTA and the footer share ONE full-width grey background.
   The CTA sits directly on the grey (no panel of its own); the dark footer floats inside it as a rounded card. */
main:has(> section:last-child .panel.on-dark) { padding-bottom: 0; }
main > section:last-child:has(.panel.on-dark) { background: var(--colour-surface-alt); padding: 80px 0 64px; }
main > section:last-child .panel.on-dark { background: transparent; border-radius: 0; padding: 0; box-shadow: none; overflow: visible; }
main:has(> section:last-child .panel.on-dark) + .footer-zone { background: var(--colour-surface-alt); }
.footer-zone { padding: 0 16px 16px; }
/* When a grey section directly precedes the closing zone, they join into one continuous grey: no white gap, no side margins or radius, a hairline divides content from the CTA */
main > .section-alt:has(+ section:last-child .panel.on-dark) { margin-left: 0; margin-right: 0; border-radius: 0; }
main > .section-alt + section:last-child:has(.panel.on-dark) { margin-top: 0; padding-top: 0; }
main > .section-alt + section:last-child:has(.panel.on-dark) > .container > .panel { border-top: 1px solid var(--colour-line); padding-top: 64px; }
@media (max-width: 767px) { main > .section-alt + section:last-child:has(.panel.on-dark) > .container > .panel { padding-top: 48px; } }
@media (max-width: 767px) { main > section:last-child:has(.panel.on-dark) { padding: 56px 0 48px; } .footer-zone { padding: 0 8px 8px; } }


/* ---------- Header → Theme Builder Header, sticky ---------- */
.topbar { background: var(--colour-primary); color: #FFFFFF; font-size: .875rem; font-weight: 600; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; flex-wrap: wrap; }
.topbar a { color: #FFFFFF; text-decoration: none; }
.topbar a:hover { color: var(--colour-sky); }
.topbar-list { display: flex; gap: 24px; list-style: none; flex-wrap: wrap; }
/* Social icons: filled brand marks (Simple Icons, CC0: linkedin, facebook, x, youtube) → Elementor Social Icons widget, custom SVG icons */
.topbar .container > .topbar-list:nth-child(2) { margin-left: auto; }
.social-list { gap: 6px; align-items: center; padding-left: 20px; border-left: 1px solid rgba(255,255,255,.2); }
.social-link { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; transition: background .3s var(--ease), color .3s var(--ease); }
.social-link svg { width: 14px; height: 14px; }
.topbar .social-link:hover { background: rgba(255,255,255,.12); color: var(--colour-sky); }
.footer-social { display: flex; gap: 8px; list-style: none; margin-top: 24px; }
.footer-social .social-link { width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.2); color: #fff; }
.footer-social .social-link svg { width: 17px; height: 17px; }
.footer-social .social-link:hover { background: #fff; color: var(--colour-primary); border-color: #fff; }
.site-header { position: sticky; top: 0; z-index: 50; background: #FFFFFF; border-bottom: 1px solid var(--colour-line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.logo img { height: 58px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav > li { position: relative; }
.nav > li > a { display: block; white-space: nowrap; padding: 10px 11px; font-size: .96875rem; font-weight: 600; color: var(--colour-primary); text-decoration: none; border-radius: var(--radius-pill); transition: background .3s var(--ease); }
.nav > li > a:hover, .nav > li:focus-within > a, .nav > li > a[aria-current="page"] { background: var(--colour-surface-alt); }
.nav .sub { position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px; background: #fff; border: 1px solid var(--colour-line); border-radius: var(--radius); padding: 10px; list-style: none; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s; box-shadow: 0 24px 48px rgba(0,39,65,.10); }
.nav > li:hover .sub, .nav > li:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
/* Last three menu items open their dropdown to the left so it never runs past the screen edge (caused sideways scroll at 1025 to 1280px) */
.nav > li:nth-last-child(-n+3) .sub { left: auto; right: 0; }
html, body { overflow-x: clip; }
.nav .sub a { display: block; padding: 9px 14px; border-radius: var(--radius-sm); color: var(--colour-text); text-decoration: none; font-size: .9375rem; }
.nav .sub a:hover { background: var(--colour-surface-alt); color: var(--colour-primary); }
.header-cta { flex: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--colour-line); border-radius: var(--radius-pill); cursor: pointer; padding: 10px 14px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--colour-primary); margin: 4px 0; }
/* Header search → icon button + Elementor Search widget in a panel below the header */
.search-toggle { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: auto; background: none; border: 1px solid var(--colour-line); border-radius: var(--radius-pill); color: var(--colour-primary); cursor: pointer; transition: background .3s var(--ease); }
.search-toggle:hover, .search-toggle[aria-expanded="true"] { background: var(--colour-surface-alt); }
.search-toggle svg { width: 19px; height: 19px; }
.site-header .container:has(.search-toggle) { justify-content: flex-start; }
.site-header .container:has(.search-toggle) > nav { margin-left: auto; }
.site-header .container:has(.search-toggle) .search-toggle { margin-left: 0; }
.header-search { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-start; padding-top: min(22vh, 200px); background: rgba(0,39,65,.94); backdrop-filter: blur(6px); animation: search-in .35s var(--ease); overflow-y: auto; }
.header-search[hidden] { display: none; }
@keyframes search-in { from { opacity: 0; } to { opacity: 1; } }
.site-header .header-search .container { display: block; min-height: 0; width: 100%; max-width: 880px; }
.header-search .eyebrow { color: var(--colour-sky); }
.header-search-form { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: var(--radius-pill); background: #fff; animation: search-up .45s var(--ease); }
@keyframes search-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.header-search-form:focus-within { box-shadow: 0 0 0 4px rgba(5,162,206,.45); }
.header-search-icon { position: absolute; left: 28px; width: 22px; height: 22px; color: var(--colour-text-muted); pointer-events: none; }
.header-search-form input { flex: 1; min-width: 0; font: inherit; font-size: 1.25rem; border: 0; background: transparent; padding: 14px 12px 14px 60px; color: var(--colour-text); }
.header-search-form input:focus { outline: none; }
.search-popular { margin-top: 32px; }
.search-popular p { font-size: .875rem; color: var(--colour-on-dark-muted); margin-bottom: 12px; }
.search-popular ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.search-popular a { display: inline-block; padding: 8px 16px; border: 1px solid rgba(255,255,255,.3); border-radius: var(--radius-pill); color: #fff; text-decoration: none; font-size: .9375rem; transition: background .3s var(--ease), color .3s var(--ease); }
.search-popular a:hover { background: #fff; color: var(--colour-primary); }
.search-close { position: absolute; top: 28px; right: 28px; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; background: none; border: 1px solid rgba(255,255,255,.35); border-radius: var(--radius-pill); color: #fff; cursor: pointer; transition: background .3s var(--ease), color .3s var(--ease); }
.search-close:hover { background: #fff; color: var(--colour-primary); }
.search-close svg { width: 22px; height: 22px; }
html.search-open { overflow: hidden; }

/* ---------- Footer → Theme Builder Footer ---------- */
.site-footer { background: var(--colour-primary); color: var(--colour-on-dark-muted); border-radius: var(--radius-lg); margin: 0; padding: calc(var(--space) * 10) 0 calc(var(--space) * 4); }
.site-footer a { color: var(--colour-on-dark-muted); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .btn-ghost-light { color: #fff; }
.site-footer .btn-ghost-light:hover { color: var(--colour-primary); } /* footer link hover turned the label white on the white pill */
.footer-grid { display: flex; flex-wrap: wrap; gap: calc(var(--space) * 6); padding-bottom: calc(var(--space) * 8); border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-grid > div { flex: 1 1 160px; }
.footer-grid > .footer-brand { flex: 2 1 300px; }
.footer-brand img { width: 230px; margin-bottom: calc(var(--space) * 3); }
.footer-title { font-family: var(--font-heading); font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: 16px; }
.footer-links { list-style: none; display: grid; gap: 10px; font-size: .96875rem; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; padding-top: calc(var(--space) * 3); font-size: .875rem; }
.footer-bottom ul { display: flex; gap: 24px; list-style: none; }

/* ---------- Motion → Entrance animation: Fade In Up, 600ms ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- Elementor breakpoints ---------- */
@media (max-width: 1280px) {
  .nav > li > a { padding: 10px 8px; font-size: .9375rem; }
  .header-cta { display: none; }
}
@media (max-width: 1024px) {
  main > * + * { margin-top: 56px; }
  main { padding-bottom: 56px; }
  .section.section-alt, .panel.section { padding: 64px 0; }
  .split { gap: calc(var(--space) * 5); }
  .nav-toggle { display: block; }
  .header-cta { display: inline-flex; margin-left: auto; }
  .site-header .container:has(.search-toggle) .search-toggle { margin-left: auto; }
  .site-header .container:has(.search-toggle) .header-cta { margin-left: 0; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--colour-line); padding: 12px 16px 20px; max-height: calc(100vh - 124px); overflow-y: auto; box-shadow: 0 24px 48px rgba(0,39,65,.12); }
  .nav.open { display: flex; }
  .nav > li > a { padding: 14px 12px; font-size: 1.0625rem; }
  .nav .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 8px 12px; display: none; min-width: 0; }
  .nav > li.expanded .sub { display: block; }
  .page-hero { background-size: 380px auto; background-position: right -120px bottom -60px; }
}
@media (max-width: 767px) {
  :root { --gutter: 20px; }
  main > * + * { margin-top: 48px; }
  main { padding-bottom: 48px; }
  .section.section-alt, .panel.section { padding: 48px 0; }
  .section-alt.section-tight, .panel.section-tight { padding: 40px 0; }
  .inset { padding: 0 8px; }
  .panel { border-radius: 24px; }
  .topbar .hide-sm { display: none; }
  .social-list { padding-left: 0; border-left: 0; gap: 2px; }
  .topbar .social-link { width: 36px; height: 36px; } /* 36px tap targets on phones */
  .header-cta { display: none; }
  .logo img { height: 44px; }
  .site-header .container:has(.search-toggle) { gap: 10px; }
  .header-search { padding-top: 112px; }
  .header-search-form input { font-size: 1.0625rem; padding-left: 48px; }
  .header-search-icon { left: 22px; width: 20px; height: 20px; }
  .header-search-form .btn { padding-left: 18px; padding-right: 18px; }
  .search-close { top: 20px; right: 16px; width: 48px; height: 48px; }
  .split > * { flex-basis: 100%; }
  .section-head { margin-bottom: calc(var(--space) * 5); }
  .page-hero { padding: calc(var(--space) * 7) 0 calc(var(--space) * 6); background-size: 260px auto; }
  .site-footer { border-radius: 24px; margin: 0; }
  .section-alt { margin-left: 8px; margin-right: 8px; border-radius: 24px; }
}

/* ---------- Mobile refinements (audit) ---------- */
@media (max-width: 767px) {
  main .mini-forums a { flex-basis: 100%; min-height: 56px; }                 /* forum tiles: one per row */
  main .doc-list a { gap: 14px; flex-wrap: wrap; }
  main .doc-list .doc-title { flex: 1 1 calc(100% - 60px); font-size: 1rem; }
  main .doc-list .tag { margin-left: 58px; }                                  /* PDF tag + download drop under the title */
  main .doc-list .doc-dl { margin-left: auto; }
  .pp-panel { padding: 32px 24px !important; }
  .pp-panel .btn { width: 100%; justify-content: center; }
  .footer-grid { gap: 32px 24px; }
  .footer-grid > .footer-brand { flex-basis: 100%; }
  .footer-grid > div:not(.footer-brand) { flex: 1 1 calc(50% - 12px); }       /* footer link columns side by side */
}
@media (min-width: 768px) and (max-width: 1024px) {
  .footer-grid > .footer-brand { flex-basis: 100%; }                       /* tablet footer: brand row, then three equal link columns */
  .footer-grid > div:not(.footer-brand) { flex: 1 1 calc(33.333% - 32px); }
}

/* Card links always sit on one baseline across a row: any card ending in a text link (directly or inside its body wrapper) becomes a column and the link is pushed to the bottom */
.card:has(> .text-link:last-child), .card:has(> :last-child > .text-link:last-child) { display: flex; flex-direction: column; }
.card:has(> :last-child > .text-link:last-child) > :last-child { flex: 1 1 auto; display: flex; flex-direction: column; }
.card > .text-link:last-child, .card > :last-child > .text-link:last-child { margin-top: auto; align-self: flex-start; }
.card > .text-link:last-child { margin-top: auto !important; }

/* ==========================================================
   Climate Governance Initiative Mauritius microsite (czm-*.html)
   Same tokens and components as MIoD; own header, footer and photo heroes.
   ========================================================== */
/* Top bar: forum line + back link → Header template, Container row */
.czm-topbar .container { justify-content: space-between; }
.czm-topbar p { color: var(--colour-on-dark-muted); font-weight: 400; }
.czm-back { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; min-height: 40px; }
.czm-back svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.czm-back:hover svg { transform: translateX(-3px); }

/* Lockup: MIoD mark + divider + forum name → Container: Image + Heading, typeset until a Climate Governance Initiative Mauritius logo is supplied */
.czm-lockup { display: inline-flex; align-items: center; gap: 16px; text-decoration: none; flex: none; }
.czm-lockup img { height: 48px; width: auto; }
.czm-lockup-text { display: flex; flex-direction: column; padding-left: 16px; border-left: 1px solid var(--colour-line); line-height: 1.1; }
.czm-lockup-parent { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--colour-secondary); }
.czm-lockup-name { font-family: var(--font-heading); font-weight: 600; font-size: 1.1875rem; color: var(--colour-primary); letter-spacing: -0.01em; margin-top: 3px; }
.czm-lockup-light .czm-lockup-text { border-left-color: rgba(255,255,255,.2); }
.czm-lockup-light .czm-lockup-parent { color: var(--colour-sky); }
.czm-lockup-light .czm-lockup-name { color: #fff; }
.czm-footer .czm-lockup img { width: auto; margin: 0; filter: brightness(0) invert(1); } /* white mark on Prussian */

/* Photo hero → Container, bg image cover + Prussian gradient overlay, min-height 520 (home 640) */
.czm-hero { position: relative; overflow: hidden; color: #fff; background: var(--colour-primary); min-height: 480px; display: flex; align-items: flex-end; }
.czm-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.czm-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,39,65,.92) 0%, rgba(0,39,65,.72) 45%, rgba(0,39,65,.25) 100%); }
.czm-hero .container { position: relative; z-index: 1; width: 100%; padding-top: 88px; padding-bottom: 72px; }
.czm-hero h1 { max-width: 20ch; }
.czm-hero .lead { margin-top: 24px; color: #E6EDF2; max-width: 58ch; }
.czm-hero .btn-row { margin-top: 36px; }
.czm-hero .breadcrumb { margin-bottom: 28px; }
.czm-hero-home { min-height: calc(100svh - 125px); max-height: 820px; min-height: min(calc(100svh - 125px), 820px); }
.czm-hero-home h1 { font-size: clamp(2.75rem, 3.8vw + 1rem, 4.5rem); max-width: 18ch; }
.czm-hero-note { margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.2); font-size: .9375rem; color: var(--colour-on-dark-muted); max-width: 60ch; }
.czm-hero-plain { min-height: 0; }
.czm-hero-plain::after { display: none; }
.czm-hero-plain { background: var(--colour-primary) url('assets/miod-mark-outline.svg') no-repeat right -80px center / 520px auto; }
.czm-access { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; padding: 10px 16px; border-radius: var(--radius-pill); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); font-size: .9375rem; font-weight: 600; }
.czm-access svg { width: 18px; height: 18px; color: var(--colour-sky); flex: none; }

/* Route and image cards */
.czm-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.czm-card .media { border-radius: 0; aspect-ratio: 16 / 9; }
.czm-card .body { padding: 32px; display: flex; flex-direction: column; flex: 1; align-items: flex-start; }
.czm-card .body > p { margin-bottom: 28px; }
.czm-card .body > :last-child { margin-top: auto; }
.czm-card h3 { font-size: clamp(1.375rem, .8vw + 1rem, 1.75rem); }

/* Toolkit tiles: icon + name + arrow → Icon Box in a 2 x 2 grid */
.czm-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.czm-tile { display: flex; flex-direction: column; gap: 20px; padding: 24px; border-radius: var(--radius); background: var(--colour-surface-dark); border: 1px solid rgba(255,255,255,.08); color: #fff; text-decoration: none; font-family: var(--font-heading); font-weight: 600; font-size: 1.0625rem; line-height: 1.3; transition: background .35s var(--ease), border-color .35s var(--ease); }
.czm-tile:hover { background: #0F4769; border-color: rgba(114,217,247,.5); }
.czm-tile-icon { width: 44px; height: 44px; border-radius: 50%; background: rgba(114,217,247,.12); color: var(--colour-sky); display: flex; align-items: center; justify-content: center; }
.czm-tile-icon svg { width: 20px; height: 20px; }
.czm-tile-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: auto; }
.czm-tile-foot svg { width: 18px; height: 18px; color: var(--colour-sky); flex: none; }
.czm-tiles-light .czm-tile { background: #fff; border-color: var(--colour-line); color: var(--colour-primary); }
.czm-tiles-light .czm-tile:hover { background: #fff; border-color: var(--colour-secondary); }
.czm-tiles-light .czm-tile-icon { background: rgba(0,119,141,.1); color: var(--colour-secondary); }
.czm-tiles-light .czm-tile-foot svg { color: var(--colour-secondary); }
.czm-tiles-3 { grid-template-columns: repeat(3, 1fr); }
.text-link svg { width: 16px; height: 16px; flex: none; transition: transform .3s var(--ease); }
.text-link:hover svg { transform: translateX(3px); }

/* Feature panel (dark, split) */
.czm-feature { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding: 64px; background: var(--colour-primary) url('assets/miod-mark-outline.svg') no-repeat left -140px bottom -180px / 460px auto; color: #fff; }
.czm-feature { padding-left: max(64px, calc((100% - var(--container)) / 2 + var(--gutter))); padding-right: max(64px, calc((100% - var(--container)) / 2 + var(--gutter))); } /* content stays in the site container while the dark box runs full width */
.czm-feature > div { flex: 1 1 380px; }
.czm-feature h2 { margin-bottom: 20px; }
.czm-feature .lead { margin-bottom: 32px; }

/* Partner strip → Container row of Image widgets */
.czm-partners { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } /* equal-width, equal-height cards */
.czm-partner { display: flex; flex-direction: column; gap: 12px; padding: 24px; border: 1px solid var(--colour-line); border-radius: var(--radius); background: #fff; }
.czm-partner-mark { flex: 1; min-height: 76px; display: flex; align-items: center; } /* same content box for logos and names */
.czm-partner-mark img { height: 56px; width: auto; max-width: 100%; object-fit: contain; }
.czm-partner-mark img.czm-partner-hsbc { height: 108px; margin: -26px 0 -26px -11px; } /* square HSBC file has white padding */
@media (max-width: 1024px) { .czm-partners { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .czm-partners { grid-template-columns: 1fr; } }
.czm-partner-label { font-size: .8125rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--colour-text-muted); }
.czm-partner-name { font-family: var(--font-heading); font-weight: 600; color: var(--colour-primary); font-size: 1.0625rem; line-height: 1.3; }

/* Expandable preview (H08) → Elementor Toggle widget containing a form */
.czm-preview { border: 1px solid var(--colour-line); border-radius: var(--radius); background: #fff; }
.czm-preview summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 20px; padding: 28px 32px; }
.czm-preview summary::-webkit-details-marker { display: none; }
.czm-preview-title { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.czm-preview-title strong { font-family: var(--font-heading); font-weight: 600; color: var(--colour-primary); font-size: clamp(1.25rem, .8vw + 1rem, 1.625rem); line-height: 1.25; }
.czm-preview-title span { color: var(--colour-text-muted); font-size: .9375rem; }
.czm-plus { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--colour-line); display: flex; align-items: center; justify-content: center; color: var(--colour-primary); flex: none; transition: transform .35s var(--ease), border-color .3s var(--ease); }
.czm-plus svg { width: 20px; height: 20px; }
.czm-preview summary:hover .czm-plus { border-color: var(--colour-secondary); color: var(--colour-secondary); }
.czm-preview[open] .czm-plus { transform: rotate(45deg); }
.czm-preview-body { padding: 0 32px 32px; border-top: 1px solid var(--colour-line); padding-top: 28px; }
.czm-preview-body > p { max-width: 64ch; margin-bottom: 24px; }

/* Inline subscribe form (H08, R05) */
.czm-subscribe { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; max-width: 640px; }
.czm-subscribe .field { flex: 1 1 280px; min-width: 0; }
.czm-help { font-size: .875rem; color: var(--colour-text-muted); margin-top: 10px; }
.czm-msg { display: none; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 14px 18px; border-radius: var(--radius-sm); font-size: .9375rem; font-weight: 600; }
.czm-msg svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.czm-msg-ok { background: rgba(0,119,141,.1); color: var(--colour-secondary); }
.czm-msg-err { background: rgba(255,58,24,.08); color: #A3260F; }
form.is-sent .czm-msg-ok, form.is-error .czm-msg-err { display: flex; }
form.is-sent .czm-hide-on-sent { display: none; }

/* Download panel (C03 / E03 / D03 / B03) → JetEngine dynamic visibility: signed-in vs signed-out button */
.czm-download { position: sticky; top: 108px; display: flex; flex-direction: column; gap: 20px; }
.czm-download-icon { width: 56px; height: 56px; border-radius: var(--radius-sm); background: rgba(0,119,141,.1); color: var(--colour-secondary); display: flex; align-items: center; justify-content: center; }
.czm-download-icon svg { width: 24px; height: 24px; }
.czm-download h2 { font-size: 1.375rem; line-height: 1.3; }
.czm-download .btn { width: 100%; }
.czm-state { font-size: .875rem; color: var(--colour-text-muted); display: flex; align-items: center; gap: 8px; }
.czm-state svg { width: 16px; height: 16px; color: var(--colour-secondary); flex: none; }
[data-auth="in"] .czm-signed-out, [data-auth="out"] .czm-signed-in { display: none !important; }
.czm-audience { display: flex; gap: 14px; align-items: flex-start; margin-top: 32px; padding: 20px 24px; border-radius: var(--radius); background: var(--colour-surface-alt); color: var(--colour-primary); font-weight: 600; }
.czm-audience svg { width: 22px; height: 22px; color: var(--colour-secondary); flex: none; margin-top: 2px; }

/* Numbered principle cards */
.czm-num { font-family: var(--font-heading); font-weight: 600; font-size: 2.5rem; line-height: 1; color: var(--colour-secondary); letter-spacing: -0.02em; display: block; margin-bottom: 40px; }
.czm-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.czm-chips .tag { font-size: .9375rem; padding: 10px 18px; background: #fff; border: 1px solid var(--colour-line); }

@media (max-width: 1280px) {
  .czm-header .nav > li > a { padding: 10px 9px; }
}
@media (max-width: 1024px) {
  .czm-feature { padding: 48px; }
  .czm-download { position: static; }
}
@media (max-width: 767px) {
  .czm-lockup img { height: 38px; }
  .czm-lockup { gap: 12px; }
  .czm-lockup-text { padding-left: 12px; }
  .czm-lockup-name { font-size: 1.0625rem; }
  .czm-hero { min-height: 420px; }
  .czm-hero::after { background: linear-gradient(0deg, rgba(0,39,65,.94) 0%, rgba(0,39,65,.78) 55%, rgba(0,39,65,.35) 100%); }
  .czm-hero .container { padding-top: 120px; padding-bottom: 48px; }
  .czm-hero-plain .container { padding-top: 56px; }
  .czm-hero-home { min-height: 600px; }
  .czm-tiles, .czm-tiles-3 { grid-template-columns: 1fr; }
  .czm-feature { padding: 36px 24px; gap: 32px; }
  .czm-preview summary { padding: 22px 20px; }
  .czm-preview-body { padding: 24px 20px 24px; }
  .czm-card .body { padding: 24px; }
  .czm-subscribe .btn { width: 100%; }
}

/* Mockup annotation (not built in WordPress): marks a section that the CRM will supply */
.crm-annot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 20px; padding: 12px 16px; border: 1px dashed #B45309; border-radius: var(--radius-sm); background: #FFF7E8; color: #7C2D12; font-size: .9375rem; line-height: 1.45; }
.crm-annot-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--radius-pill); background: #B45309; color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .1em; }
.crm-annot-tag svg { width: 14px; height: 14px; }
.crm-zone { outline: 2px dashed #B45309; outline-offset: 6px; }
form.crm-zone, .czm-sessions.crm-zone { border-radius: var(--radius-sm); }

/* ---------- Resources page-specific ---------- */
/* ---------- Page-specific ---------- */
.czm-video { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; border: 0; padding: 0; cursor: pointer; background: var(--colour-primary); }
.czm-video img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.czm-video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,39,65,.75), rgba(0,39,65,.15)); }
.czm-video:hover img { transform: scale(1.03); }
.czm-play { position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 16px; color: #fff; font-family: var(--font-heading); font-weight: 600; font-size: 1.25rem; }
.czm-play-icon { width: 88px; height: 88px; border-radius: 50%; background: #fff; color: var(--colour-primary); display: flex; align-items: center; justify-content: center; transition: transform .35s var(--ease); }
.czm-video:hover .czm-play-icon { transform: scale(1.06); }
.czm-play-icon svg { width: 30px; height: 30px; margin-left: 4px; }
.czm-video-note { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 24px; color: #fff; font-weight: 600; display: none; }
.czm-video.is-playing .czm-video-note { display: block; }
.czm-seats { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 32px; padding: 10px 18px; border-radius: var(--radius-pill); background: rgba(114,217,247,.14); color: #fff; font-weight: 600; }
.czm-seats::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--colour-signature); }
.czm-reg { margin-top: 16px; border: 1px solid var(--colour-line); border-radius: var(--radius-lg); background: #fff; padding: 56px; scroll-margin-top: 110px; }
.czm-reg-head { margin-bottom: 36px; max-width: 640px; }
.czm-reg-head h2 { font-size: clamp(1.625rem, 1.4vw + 1rem, 2.25rem); margin-bottom: 12px; }
.czm-checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; border: 0; }
.czm-checks legend { margin-bottom: 12px; }
.czm-checks label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--colour-text); font-size: 1rem; }
.czm-checks input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--colour-secondary); flex: none; }
.field .czm-help { margin: 0; }
.czm-reg-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; width: 100%; margin-top: 8px; }
.czm-updates { display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: flex-end; }
.czm-updates > div:first-child { flex: 1 1 340px; }
.czm-updates > form { flex: 1 1 420px; }
@media (max-width: 767px) { .czm-reg { padding: 32px 20px; } .czm-checks { grid-template-columns: 1fr; } .czm-play-icon { width: 64px; height: 64px; } .czm-play { font-size: 1.0625rem; } .czm-reg-actions .btn { width: 100%; } }

/* ==========================================================
   Account link (auth-aware) + co-branded header lockup.
   Matches the czm-* mockups: the header shows the MIoD mark |
   the CGI Mauritius logo; the account link reads "Sign in" for
   signed-out visitors and the account name when signed in.
   ========================================================== */
.czm-account { flex: none; position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 11px; margin-left: 13px; font-size: .96875rem; font-weight: 600; color: var(--colour-primary); text-decoration: none; white-space: nowrap; border-radius: var(--radius-pill); transition: background .3s var(--ease); }
.czm-account::before { content: ""; position: absolute; left: -13px; top: 50%; width: 1px; height: 24px; transform: translateY(-50%); background: var(--colour-line); }
.czm-account:hover, .czm-account[aria-current="page"] { background: var(--colour-surface-alt); }
.czm-account svg { width: 18px; height: 18px; flex: none; }
.czm-account-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.czm-header .container > nav { margin-left: auto; }
@media (max-width: 1280px) { .czm-account { padding: 10px 9px; font-size: .9375rem; } }
@media (max-width: 1024px) { .czm-header .container { gap: 10px; } .czm-header .czm-account { margin-left: auto; } .czm-account::before { display: none; } }
@media (max-width: 767px) { .czm-account { width: 44px; height: 44px; padding: 0; justify-content: center; } .czm-account span { display: none; } }

/* Header "Register" link — same design as the Sign in link, placed beside it.
   The divider (from .czm-account::before) sits between the two. */
.czm-register { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 11px; margin-left: 13px; font-size: .96875rem; font-weight: 600; color: var(--colour-primary); text-decoration: none; white-space: nowrap; border-radius: var(--radius-pill); transition: background .3s var(--ease); }
.czm-register:hover { background: var(--colour-surface-alt); color: var(--colour-primary); }
.czm-register svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 1280px) { .czm-register { padding: 10px 9px; font-size: .9375rem; } }
@media (max-width: 1024px) { .czm-header .czm-register { margin-left: auto; } }
@media (max-width: 767px)  { .czm-register { width: 44px; height: 44px; padding: 0; justify-content: center; } .czm-register span { display: none; } }

/* Flash / status banner on the public pages (e.g. after setting a password). */
.czm-flash { margin: 24px 0 0; padding: 14px 20px; border-radius: var(--radius-sm); background: rgba(0,119,141,.08); border: 1px solid rgba(0,119,141,.3); color: var(--colour-primary); font-weight: 600; }

/* Co-branded header lockup: MIoD mark | divider | CGI Mauritius logo */
.czm-header .czm-lockup { gap: 0; }
.czm-header .czm-lockup a { display: inline-flex; align-items: center; }
.czm-header .czm-lockup-miod img { height: 50px; width: auto; display: block; }
.czm-header .czm-lockup-cgi { padding-left: 18px; margin-left: 18px; border-left: 1px solid var(--colour-line); }
.czm-header .czm-lockup-cgi img { height: 50px; width: auto; display: block; }
@media (max-width: 767px) {
  .czm-header .czm-lockup-miod img { height: 34px; }
  .czm-header .czm-lockup-cgi { padding-left: 12px; margin-left: 12px; }
  .czm-header .czm-lockup-cgi img { height: 36px; }
  .czm-header .czm-lockup { flex: 0 1 auto; min-width: 0; }
  .site-header .container { gap: 10px; }
}

/* The MIoD brand mark is an inline SVG in the app (no PNG asset needed) */
.czm-lockup-mark { height: 48px; width: auto; display: block; flex: none; }
.czm-lockup-light .czm-lockup-mark { filter: brightness(0) invert(1); }

/* Newsletter opt-in (registration form) */
.czm-optin { flex-direction: row; align-items: flex-start; gap: 12px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--colour-surface-alt); font-weight: 400; color: var(--colour-text); font-size: 1rem; cursor: pointer; }
.czm-optin input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--colour-secondary); flex: none; }

/* ---------- About page-specific ---------- */
.czm-purpose { display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: flex-start; }
.czm-purpose > div:first-child { flex: 1 1 280px; }
.czm-purpose > p { flex: 2 1 480px; font-family: var(--font-heading); font-weight: 600; color: var(--colour-primary); font-size: clamp(1.375rem, 1.2vw + 1rem, 2rem); line-height: 1.3; letter-spacing: -0.01em; text-wrap: pretty; }
.czm-facts { list-style: none; display: grid; gap: 0; margin-top: 32px; border-top: 1px solid var(--colour-line); }
.czm-facts li { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--colour-line); }
.czm-facts strong { flex: 0 0 120px; font-size: .8125rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--colour-secondary); padding-top: 3px; }
.czm-facts span { color: var(--colour-primary); font-weight: 600; }
.czm-principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 48px 0 40px; }
.czm-principles .card { padding: 28px; }
.czm-principles h3 { font-size: 1.25rem; margin: 0; }
.czm-foundations { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding-top: 32px; border-top: 1px solid var(--colour-line); }
.czm-foundations p { font-weight: 600; color: var(--colour-primary); }
@media (max-width: 1024px) { .czm-principles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .czm-principles { grid-template-columns: 1fr; } .czm-facts li { flex-direction: column; gap: 4px; } .czm-facts strong { flex-basis: auto; } }

/* ---------- Learning page-specific ---------- */
.czm-session { display: flex; flex-wrap: wrap; background: #fff; border: 1px solid var(--colour-line); border-radius: var(--radius); overflow: hidden; }
.czm-session .media { flex: 0 0 280px; border-radius: 0; min-height: 200px; }
.czm-session .body { flex: 1 1 360px; padding: 28px 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.czm-session h3 { font-size: 1.3125rem; }
.czm-session-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; font-size: .9375rem; color: var(--colour-text-muted); }
.czm-session-meta li { display: inline-flex; align-items: center; gap: 8px; }
.czm-session-meta svg { width: 16px; height: 16px; color: var(--colour-secondary); }
.czm-session .text-link { margin-top: 8px; }
.czm-sessions { display: grid; gap: 16px; }
.czm-empty { margin-top: 40px; text-align: center; padding: 48px 24px; border: 1px dashed var(--colour-line); border-radius: var(--radius); background: #fff; }
.czm-empty p:not(.eyebrow) { max-width: 52ch; margin: 0 auto 24px; color: var(--colour-text-muted); }
.sample-note { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: var(--radius-sm); background: rgba(5,162,206,.08); border: 1px dashed var(--colour-accent); color: var(--colour-primary); font-size: .9375rem; margin-bottom: 24px; }
@media (max-width: 767px) { .czm-session .media { flex-basis: 100%; min-height: 180px; } .czm-session .body { padding: 24px; } }

/* ---------- Contact page-specific ---------- */
.czm-contact { display: flex; flex-wrap: wrap; align-items: stretch; border: 1px solid var(--colour-line); }
.czm-contact-form { flex: 2 1 520px; padding: 56px; background: #fff; }
.czm-contact-form h2 { font-size: clamp(1.625rem, 1.4vw + 1rem, 2.25rem); margin-bottom: 32px; }
.czm-contact-side { flex: 1 1 320px; padding: 56px 48px; background: var(--colour-primary) url('assets/miod-mark-outline.svg') no-repeat right -160px bottom -160px / 420px auto; color: var(--colour-on-dark-muted); }
.czm-contact-side h2 { font-size: 1.625rem; margin-bottom: 28px; }
.czm-contact-list { list-style: none; display: grid; gap: 24px; }
.czm-contact-list li { display: flex; gap: 16px; }
.czm-contact-list .icon { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.08); color: var(--colour-sky); display: flex; align-items: center; justify-content: center; flex: none; }
.czm-contact-list .icon svg { width: 18px; height: 18px; }
.czm-contact-list a { color: #fff; font-weight: 600; text-decoration: none; font-size: 1.0625rem; }
.czm-contact-list a:hover { text-decoration: underline; }
.czm-contact-list address { font-style: normal; line-height: 1.6; }
.czm-contact-list li > span:last-child { padding-top: 10px; }
.czm-route-field[hidden] { display: none; }
@media (max-width: 767px) { .czm-contact-form, .czm-contact-side { padding: 36px 24px; } .czm-contact-form .btn { width: 100%; } }

/* Inline field validation (registration form) */
.czm-field-err { display: none; margin: 0; font-size: .875rem; line-height: 1.4; color: #A3260F; }
.czm-field-err:not(:empty) { display: block; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--colour-required); }
.field input[aria-invalid="true"]:focus, .field select[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(217,45,32,.2); }

/* ==========================================================
   Sign-in / Create account page (czm-sign-in): split panel + tabs
   ========================================================== */
.czm-auth { display: flex; flex-wrap: wrap; align-items: stretch; border: 1px solid var(--colour-line); }
.czm-auth .czm-auth-side { padding-left: max(48px, calc((100vw - 32px - var(--container)) / 2 + var(--gutter))); }
.czm-auth .czm-auth-main { padding-right: max(56px, calc((100vw - 32px - var(--container)) / 2 + var(--gutter))); }
.czm-auth-side { flex: 1 1 340px; padding: 56px 48px; background: var(--colour-primary) url('assets/miod-mark-outline.svg') no-repeat right -160px bottom -160px / 420px auto; color: var(--colour-on-dark-muted); display: flex; flex-direction: column; gap: 20px; }
.czm-auth-side h1 { font-size: clamp(2rem, 2vw + 1rem, 2.75rem); }
.czm-auth-side .checklist li { color: #fff; }
.czm-auth-side .checklist li::before { border-color: var(--colour-sky); }
.czm-auth-main { flex: 1.4 1 440px; padding: 56px; background: #fff; }
.czm-tabs { display: flex; gap: 4px; padding: 4px; border-radius: var(--radius-pill); background: var(--colour-surface-alt); margin-bottom: 36px; width: fit-content; }
.czm-tabs button { font: inherit; font-weight: 600; font-size: .9375rem; padding: 10px 20px; border: 0; border-radius: var(--radius-pill); background: none; color: var(--colour-primary); cursor: pointer; }
.czm-tabs button[aria-selected="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0,39,65,.12); }
.czm-auth-main h2 { font-size: clamp(1.625rem, 1.4vw + 1rem, 2.125rem); margin-bottom: 12px; }
.czm-auth-main .form-grid { margin-top: 28px; }
.czm-auth-main .field { flex-basis: 100%; }
.czm-auth-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .9375rem; }
.czm-auth-links a, .czm-auth-links button { color: var(--colour-secondary); font-weight: 600; background: none; border: 0; font: inherit; font-size: .9375rem; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.czm-auth-actions { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; width: 100%; margin-top: 8px; }
.czm-auth-main .czm-profile .field:not(.full) { flex-basis: calc(50% - 10px); }
@media (max-width: 767px) { .czm-auth .czm-auth-side, .czm-auth .czm-auth-main { padding: 36px 24px; } .czm-auth-actions .btn { width: 100%; } .czm-auth-main .czm-profile .field:not(.full) { flex-basis: 100%; } }

/* Registration phone field: searchable country-code combobox + number box */
.phone-field { display: flex; gap: 10px; align-items: stretch; }
.phone-field .phone-field__number { flex: 1 1 auto; min-width: 0; }
.phone-field.is-invalid .phone-field__number, .phone-field.is-invalid .phone-cc__btn { border-color: var(--colour-signature); }

.phone-cc { position: relative; flex: 0 0 auto; }
.phone-cc__btn { display: flex; align-items: center; gap: 8px; height: 100%; min-height: 52px; padding: 0 14px; background: var(--colour-surface); border: 1px solid var(--colour-line); border-radius: var(--radius-sm); font: inherit; color: var(--colour-text); cursor: pointer; white-space: nowrap; transition: border-color .2s, box-shadow .2s; }
.phone-cc__btn:hover { border-color: #A9B8C3; }
.phone-cc__btn[aria-expanded="true"] { border-color: var(--colour-secondary); box-shadow: 0 0 0 3px rgba(5,162,206,.25); }
.phone-cc__iso { font-weight: 700; font-size: .8125rem; letter-spacing: .04em; background: var(--colour-surface-alt); color: var(--colour-primary); border-radius: 6px; padding: 3px 7px; }
.phone-cc__code { font-weight: 600; color: var(--colour-text); }
.phone-cc__caret { color: var(--colour-text-muted); flex: none; }

.phone-cc__pop { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: 320px; max-width: min(320px, 86vw); background: #fff; border: 1px solid var(--colour-line); border-radius: var(--radius-sm); box-shadow: 0 20px 44px rgba(0,39,65,.16); padding: 8px; }
.phone-cc__search { width: 100%; font: inherit; font-size: .95rem; padding: 10px 12px; border: 1px solid var(--colour-line); border-radius: 8px; margin-bottom: 6px; }
.phone-cc__search:focus { outline: none; border-color: var(--colour-secondary); box-shadow: 0 0 0 3px rgba(5,162,206,.22); }
.phone-cc__list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.phone-cc__opt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: .95rem; }
.phone-cc__opt:hover { background: var(--colour-surface-alt); }
.phone-cc__opt[aria-selected="true"] { background: rgba(0,119,141,.1); }
.phone-cc__opt .phone-cc__name { flex: 1 1 auto; color: var(--colour-text); }
.phone-cc__opt .phone-cc__code { color: var(--colour-text-muted); }
@media (max-width: 480px) { .phone-field { flex-wrap: wrap; } .phone-cc, .phone-cc__btn { width: 100%; } .phone-cc__pop { width: 100%; } }
