/*
Theme Name: CPI Geneva
Theme URI: https://cpi-geneva.org/
Author: Cordoba Peace Institute – Geneva
Description: The theme of the Cordoba Peace Institute – Geneva. Swiss, minimal and self-contained: mega-menu header, slider and carousels on the home page, readable posts and pages with tables of contents, and a footer with mailing list. No page builder, no required plugins, no jQuery, no external requests. Menus install themselves on activation; options live in Appearance → Customize → CPI Geneva.
Version: 1.62
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cpi-geneva
Tags: blog, news, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, rtl-language-support, wide-blocks
*/

/* =================================================================
   1. Tokens
   Colours follow the Customizer (red and ink); the rest derive from them.
   ================================================================= */
:root {
	--red: #d31f26;
	--ink: #1a2530;
	--red-deep: color-mix(in srgb, var(--red) 80%, #000);
	--slate: color-mix(in srgb, var(--ink) 74%, #fff);
	--quiet: color-mix(in srgb, var(--ink) 55%, #fff);
	--line: color-mix(in srgb, var(--ink) 13%, #fff);
	--mist: color-mix(in srgb, var(--ink) 4%, #fff);
	--white: #fff;

	--font: "TWK Everett", "Inter", "CPI Arabic", "Noto Sans Arabic", "Helvetica Neue", Arial, sans-serif;
	--tracking-display: -0.02em;
	--title-weight: 450; /* titles: Everett Medium (Arabic: At Hauss Medium) – the heaviest weights we have, no bold */
	--side-title-size: clamp(1rem, 0.86rem + 0.32vw, 1.1875rem); /* red section titles */

	--wrap: 1280px;
	--gutter: clamp(20px, 4vw, 40px);
	--col-gap: 32px;
	--topbar-h: 36px;
	/* One logo size for header and footer; the header bar is the logo plus equal space above and below. */
	--logo-h: 76px;       /* full logo on larger screens */
	--logo-foot-h: 76px;
	--masthead-pad: 16px;
	--masthead-h: calc(var(--logo-h) + 2 * var(--masthead-pad));
	--admin-bar: var(--wp-admin--admin-bar--height, 0px);
	--ease: cubic-bezier(.2, .7, .2, 1);
}

/* =================================================================
   2. Base
   ================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: calc(var(--masthead-h) + var(--admin-bar) + 24px);
}
body {
	margin: 0;
	overflow-x: clip; /* never scroll sideways (clip keeps the sticky header working) */
	background: var(--white);
	color: var(--ink);
	font: 400 1.0625rem/1.6 var(--font);
	font-feature-settings: "kern", "liga", "calt";
	font-synthesis: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}
html[lang^="ar"] { --font: "CPI Arabic", "TWK Everett", "Inter", "Noto Sans Arabic", Arial, sans-serif; }
/* Arabic: PolySans Arabic Slim for text, At Hauss Arabic Medium for titles (Latin and numbers stay in Everett) */
html[lang^="ar"] :is(h1, h2, h3, h4, h5, h6, .entry-title, .hero__title, .hero__plain-title, .card__title, .bio__name, .member__name, .side-title, .label) { font-weight: 450; }
html[lang^="ar"] body * { letter-spacing: 0 !important; }

img, video, iframe, svg { max-width: 100%; }
img { display: block; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: var(--title-weight); line-height: 1.2; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 1px; }
::selection { background: color-mix(in srgb, var(--red) 18%, #fff); }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; clip-path: none; width: auto; height: auto; z-index: 1000;
	inset-block-start: 12px; inset-inline-start: 12px; padding: 12px 18px; background: var(--white); color: var(--ink);
}
.cpi-icon { flex-shrink: 0; }
[dir="rtl"] .cpi-icon--arrow-left, [dir="rtl"] .cpi-icon--arrow-right, [dir="rtl"] .cpi-icon--arrow-up-right { transform: scaleX(-1); }

/* Buttons and links */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 20px; border: 1px solid transparent; border-radius: 2px;
	font: 400 0.9375rem/1.2 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s;
}
.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: var(--red-deep); color: var(--white); }
.btn--ink { background: var(--ink); color: var(--white); }
.btn--ink:hover { background: var(--red); color: var(--white); }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.more-link {
	display: inline-flex; align-items: center; gap: 6px; font-size: 0.9375rem; color: var(--ink);
	text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: .3em;
	transition: text-decoration-color .15s, color .15s;
}
.more-link:hover { color: var(--red); text-decoration-color: currentColor; }

.round-btn {
	display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
	border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--ink); cursor: pointer;
	transition: border-color .15s, color .15s;
}
.round-btn:hover { border-color: var(--ink); }
.round-btn:disabled { opacity: .35; cursor: default; border-color: var(--line); }

.icon-btn {
	display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
	background: none; border: 0; border-radius: 2px; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { color: var(--red); }

/* Small red labels: categories, side titles */
.label {
	display: inline-block; font-size: 0.875rem; line-height: 1.3; color: var(--red);
	text-decoration: none;
}
a.label:hover { text-decoration: underline; text-underline-offset: .25em; }
.side-title {
	margin: 0; font-size: var(--side-title-size); font-weight: var(--title-weight); line-height: 1.35; letter-spacing: 0; color: var(--red);
}
.statement {
	margin: 0 0 24px; font-size: clamp(1.5rem, 2.7vw, 2.25rem); font-weight: 400; line-height: 1.22;
	letter-spacing: var(--tracking-display);
}

/* Meta line: "Author · date · 4 min read" */
.meta { display: flex; flex-wrap: wrap; align-items: center; margin: 0; font-size: 0.8125rem; color: var(--quiet); }
.meta > * + *::before { content: "·"; margin-inline: 0.5em; }
.meta__author { color: var(--slate); }

/* Social icons */
.social { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; list-style: none; }
.social a { display: flex; color: var(--slate); transition: color .15s; }
.social a:hover { color: var(--ink); }
.social--footer { gap: 18px; margin-top: 28px; }
.social--footer a { color: var(--ink); }
.social--footer a:hover { color: var(--red); }

/* Language links */
.langs { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; }
.langs a, .langs span { display: inline-block; }
.langs span[aria-current] { color: var(--ink); }
.langs a { color: var(--slate); }
.langs a:hover { color: var(--red); }

/* Language switch: the other two languages only, in bold */
.lsw { display: flex; align-items: center; }
.lsw__list { display: flex; align-items: center; gap: 4px 20px; margin: 0; padding: 0; list-style: none; }
.lsw__link { display: inline-flex; align-items: center; color: var(--ink); font-weight: var(--title-weight); text-decoration: none; transition: color .15s; }
.lsw__link:hover { color: var(--red); }
.lsw__link[lang="ar"] .lsw__name { font-size: 1.0625em; }
.lsw--top { font-size: 0.875rem; }

/* Smaller screens: short codes in outlined frames, in the header */
.lsw__tile {
	display: inline-grid; place-items: center; min-width: 34px; height: 30px; padding-inline: 6px;
	border: 1.5px solid currentColor; border-radius: 6px;
	font-size: 0.875rem; font-weight: var(--title-weight); line-height: 1; letter-spacing: 0;
	transition: background-color .15s, color .15s, border-color .15s;
}
.lsw__link[lang="ar"] .lsw__tile { font-size: 1.0625rem; padding-bottom: 3px; }
.lsw--mini .lsw__link:hover { color: var(--ink); }
.lsw--mini .lsw__link:hover .lsw__tile, .lsw--mini .lsw__link:focus-visible .lsw__tile { background: var(--ink); border-color: var(--ink); color: var(--white); }
.lsw--mini { display: none; margin-inline-end: 6px; }
.lsw--mini .lsw__list { gap: 6px; }
.lsw--mini .lsw__link { padding: 6px 0; }
.site-header:not(.has-topbar) .lsw--mini { display: flex; }
@media (max-width: 1099px) { .lsw--mini { display: flex; } }

/* =================================================================
   3. Header: top bar + sticky masthead
   ================================================================= */
.site-header {
	position: sticky; z-index: 100; top: var(--admin-bar);
	background: var(--white);
}
.site-header.has-topbar { top: calc(var(--admin-bar) - var(--topbar-h)); }
.site-header.is-scrolled .masthead { box-shadow: 0 1px 0 var(--line), 0 8px 24px -16px rgba(26, 37, 48, .18); }

.topbar { height: var(--topbar-h); border-bottom: 1px solid var(--line); font-size: 0.875rem; color: var(--ink); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 24px; }
.topbar__end { display: flex; align-items: center; gap: 22px; }
.topbar__link { color: var(--ink); font-weight: var(--title-weight); transition: color .15s; }
.topbar__link:hover { color: var(--red); }
.social--top { gap: 14px; padding-inline-start: 22px; border-inline-start: 1px solid var(--line); }
.social--top a { color: var(--ink); }
.social--top a:hover { color: var(--red); }

.masthead { position: relative; border-bottom: 1px solid var(--line); background: var(--white); transition: box-shadow .2s; }
.masthead__inner { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); height: var(--masthead-h); }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand picture { display: block; }
.brand img { display: block; height: var(--logo-h); width: auto; max-width: none; }
.brand--footer img { height: var(--logo-foot-h); }
.brand--text .brand__name { font-size: 1.375rem; font-weight: 450; letter-spacing: -0.01em; line-height: 1.15; max-width: 15ch; color: var(--ink); }
.masthead__actions { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.masthead__cta { margin-inline-start: 6px; }
.menu-toggle { display: none; }
.menu-toggle .cpi-icon--close { display: none; }

/* Main navigation */
.mainnav { align-self: stretch; flex: 1 1 auto; min-width: 0; }
.mainnav__list { display: flex; height: 100%; list-style: none; }
.mainnav__item { display: flex; }
.mainnav__trigger, .mainnav__link {
	position: relative; display: flex; align-items: center; gap: 6px;
	height: 100%; padding: 0 14px; border: 0; background: none; cursor: pointer;
	font-size: 1rem; line-height: 1; color: var(--ink); white-space: nowrap;
}
.mainnav__trigger::after, .mainnav__link::after {
	content: ""; position: absolute; inset-inline: 14px; bottom: -1px; height: 2px; background: var(--red);
	transform: scaleX(0); transition: transform .2s var(--ease);
}
.mainnav__trigger .cpi-icon { color: var(--quiet); transition: transform .2s var(--ease); }
.mainnav__trigger:hover, .mainnav__link:hover { color: var(--ink); }
.mainnav__item.is-open > .mainnav__trigger::after,
.mainnav__item.is-current > .mainnav__trigger::after,
.mainnav__item.is-current > .mainnav__link::after,
.mainnav__trigger:hover::after, .mainnav__link:hover::after { transform: scaleX(1); }
.mainnav__item.is-open > .mainnav__trigger .cpi-icon { transform: rotate(180deg); color: var(--ink); }

/* "More" item for menus too long for one line (set by the header script) */
.mainnav__item.is-overflow, .mainnav__more.is-hidden, .mainnav__more .mega__col.is-hidden { display: none; }
.mega__inner--more { grid-template-columns: minmax(0, 1fr) !important; }
.mega__inner--more .mega__cols { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.nav-compact .mainnav__more { display: none; }
.nav-compact .mainnav__item.is-overflow { display: block; }

/* Mega panel (WordPress.com-style), full width under the masthead */
.mega {
	position: absolute; inset-inline: 0; top: 100%;
	background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
	box-shadow: 0 28px 48px -24px rgba(26, 37, 48, .22);
	opacity: 0; visibility: hidden; transform: translateY(-6px);
	transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s linear .18s;
}
.mainnav__item.is-open > .mega,
.no-js .mainnav__item:hover > .mega,
.no-js .mainnav__item:focus-within > .mega {
	opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
}
.mega__inner {
	display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr);
	gap: 48px; padding-block: 44px 52px;
	max-height: calc(100vh - var(--masthead-h) - var(--admin-bar)); overflow-y: auto;
}
.mega__inner:not(:has(.mega__feature)) { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); }
.mega__title { margin: 0 0 12px; font-size: 1.75rem; font-weight: var(--title-weight); line-height: 1.15; letter-spacing: var(--tracking-display); }
.mega__desc { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: var(--slate); max-width: 32ch; }
.mega__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 20px; font-size: 0.9375rem; color: var(--red); }
.mega__more:hover { color: var(--red-deep); text-decoration: underline; text-underline-offset: .25em; }

.mega__cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 36px 40px; align-content: start; }
.mega__col.is-long { grid-column: span 2; }
.mega__col.is-long .mega__links { columns: 2; column-gap: 40px; }
.mega__heading {
	margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
	font-size: 0.8125rem; line-height: 1.3; color: var(--quiet);
}
.mega__heading a { color: inherit; }
.mega__heading a:hover { color: var(--red); }
.mega__links { list-style: none; }
.mega__links > li { margin-bottom: 11px; break-inside: avoid; }
.mega__links a { font-size: 0.9375rem; line-height: 1.35; color: var(--ink); }
.mega__links a:hover, .mega__links a[aria-current] { color: var(--red); }
.mega__sub { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 5px; list-style: none; }
.mega__sub a { font-size: 0.8125rem; color: var(--slate); }

.mega__feature { display: flex; flex-direction: column; gap: 6px; align-self: start; color: var(--ink); }
.mega__feature-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--mist); margin-bottom: 8px; }
.mega__feature-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.mega__feature:hover img { transform: scale(1.03); }
.mega__feature-label { font-size: 0.8125rem; color: var(--red); }
.mega__feature-title { font-size: 1.0625rem; line-height: 1.3; }
.mega__feature-date { font-size: 0.8125rem; color: var(--quiet); }
.mega__feature:hover .mega__feature-title { color: var(--red); }

/* Search panel */
.search-panel {
	position: absolute; inset-inline: 0; top: 100%; z-index: 2;
	background: var(--white); border-bottom: 1px solid var(--line);
	box-shadow: 0 28px 48px -24px rgba(26, 37, 48, .22); padding-block: 28px;
}
.search-form { display: flex; align-items: center; gap: 14px; max-width: 880px; border-bottom: 1px solid var(--ink); padding-bottom: 8px; }
.search-form .cpi-icon { color: var(--quiet); }
.search-form input[type="search"] {
	flex: 1; min-width: 0; padding: 8px 0; border: 0; background: transparent; color: var(--ink);
	font: 400 clamp(1.25rem, 2.4vw, 1.75rem)/1.3 var(--font); letter-spacing: var(--tracking-display);
}
.search-form input[type="search"]:focus { outline: none; }
.search-form input::placeholder { color: var(--quiet); }

.drawer-extras { display: none; }

/* Narrow screens */
@media (max-width: 1099px) {
	:root { --masthead-pad: 16px; }
	.topbar { display: none; }
	.site-header.has-topbar { top: var(--admin-bar); }
	/* Without JavaScript the menu simply wraps under the logo. */
	.no-js .masthead__inner { flex-wrap: wrap; height: auto; padding-block: 12px; }
	.no-js .mainnav { order: 9; flex-basis: 100%; }
	.no-js .mainnav__list { flex-wrap: wrap; }
	.no-js .mainnav__trigger, .no-js .mainnav__link { height: 44px; }
}

/* Drawer navigation: on narrow screens, and on any screen where the menu
   does not fit on one line (e.g. longer French and Arabic menus). The class
   is set before the page is painted by a small script in the header. */
.nav-compact .menu-toggle { display: inline-grid; }
.nav-compact .nav-open .menu-toggle .cpi-icon--menu { display: none; }
.nav-compact .nav-open .menu-toggle .cpi-icon--close { display: block; }

.nav-compact .mainnav {
	display: none; position: fixed; z-index: 99; inset-inline: 0; bottom: 0;
	top: var(--drawer-top, calc(var(--masthead-h) + var(--admin-bar)));
	overflow-y: auto; overscroll-behavior: contain; background: var(--white);
	padding: 8px var(--gutter) 40px;
}
.nav-compact .nav-open .mainnav { display: block; }
.nav-compact .mainnav__list { display: block; height: auto; }
.nav-compact .mainnav__item { display: block; border-bottom: 1px solid var(--line); }
.nav-compact .mainnav__trigger, .nav-compact .mainnav__link { width: 100%; height: auto; justify-content: space-between; padding: 18px 0; font-size: 1.25rem; font-weight: 400; }
.nav-compact .mainnav__trigger::after, .nav-compact .mainnav__link::after { display: none; }
.nav-compact .mainnav__trigger .cpi-icon { width: 20px; height: 20px; }

.nav-compact .mega {
	position: static; display: none; opacity: 1; visibility: visible; transform: none;
	border: 0; box-shadow: none; transition: none;
}
.nav-compact .mainnav__item.is-open > .mega { display: block; }
.nav-compact .mega__inner { display: block; padding: 0 0 24px; max-height: none; overflow: visible; }
.nav-compact .mega__title, .nav-compact .mega__desc { display: none; }
.nav-compact .mega__more { margin: 0 0 20px; }
.nav-compact .mega__cols { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.nav-compact .mega__col.is-long { grid-column: auto; }
.nav-compact .mega__col.is-long .mega__links { columns: 1; }
.nav-compact .mega__feature { display: none; }

.nav-compact .drawer-extras { display: block; padding-top: 28px; }
.nav-compact .drawer-extras .search-form input[type="search"] { font-size: 1.125rem; }
.nav-compact .mainnav .drawer-extras[hidden] { display: block; }
.nav-compact .drawer-extras .langs { margin-bottom: 20px; font-size: 1rem; }
.nav-compact .nav-locked { overflow: hidden; }
/* Phones: the square mark in the header; in the footer, the full logo sized so its
   emblem matches the header mark exactly (from the artwork's proportions). */
@media (max-width: 767px) {
	:root { --logo-h: 64px; --logo-foot-h: 74px; }
	html[lang^="ar"] { --logo-foot-h: 69px; }
}
@media (max-width: 380px) {
	:root { --logo-h: 52px; --masthead-pad: 14px; --logo-foot-h: 60px; }
	html[lang^="ar"] { --logo-foot-h: 56px; }
}
@media (max-width: 560px) {
	.masthead__cta { padding-inline: 14px; }
	.search-toggle { display: none; }
}
.drawer-extras .search-form { margin-bottom: 28px; }
.drawer-extras .search-form .btn { display: none; }

/* =================================================================
   4. Layout helpers
   ================================================================= */
.section { padding-block: clamp(48px, 6.5vw, 88px); }
.hero + .section { border-top: 1px solid var(--line); }
.section--mist { background: var(--mist); }
.section:not(.section--mist) + .section:not(.section--mist),
.section--rule { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-bottom: 32px; }
.section-head__end { display: flex; align-items: center; gap: 24px; }
.carousel-nav { display: flex; gap: 8px; }

/* Swiss grid: red side title in the first three columns, content in the other nine */
.swiss { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
.swiss > .side-title { grid-column: 1 / span 3; padding-top: 0.45em; }
.swiss__main { grid-column: 4 / -1; min-width: 0; }
@media (max-width: 900px) {
	.swiss { display: block; }
	.swiss > .side-title { margin-bottom: 20px; padding-top: 0; }
}

.grid { display: grid; gap: 48px var(--col-gap); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--3 { grid-template-columns: minmax(0, 1fr); } }

/* =================================================================
   5. Cards
   ================================================================= */
.card { display: flex; flex-direction: column; min-width: 0; }
.card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--mist); margin-bottom: 18px; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.03); }
.card__placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--mist), color-mix(in srgb, var(--ink) 8%, #fff)); }
.card__body > * + * { margin-top: 8px; }
.card__title { font-size: 1.1875rem; font-weight: var(--title-weight); line-height: 1.3; letter-spacing: -0.005em; }
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--red); }
.card__excerpt { margin: 10px 0 0; font-size: 0.9375rem; line-height: 1.55; color: var(--slate); }
.card .meta { margin-top: 12px; }

.card--row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 20px; align-items: start; }
.card--row .card__media { margin: 0; }
.card--row .card__title { font-size: 1.0625rem; }
.card--lead .card__title { font-size: clamp(1.375rem, 2.2vw, 1.75rem); font-weight: var(--title-weight); line-height: 1.2; letter-spacing: var(--tracking-display); }

/* =================================================================
   6. Home
   ================================================================= */
/* Slider */
.hero { padding-block: clamp(28px, 4vw, 44px) clamp(40px, 5vw, 64px); }
.hero__track {
	display: grid; grid-auto-flow: column; grid-auto-columns: 100%; list-style: none;
	overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain;
	overflow-y: hidden; touch-action: pan-x pan-y; /* sideways only: vertical gestures always scroll the page */
}
.hero__track::-webkit-scrollbar { display: none; }
.hero__track:focus-visible { outline-offset: 6px; }
.hero__slide { scroll-snap-align: start; min-width: 0; }
.hero__media { display: block; aspect-ratio: 1140 / 445; overflow: hidden; background: var(--mist); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media--plain { display: flex; align-items: flex-end; padding: clamp(24px, 4vw, 56px); background: var(--ink); color: #fff; text-decoration: none; }
.hero__plain-title { max-width: 22ch; font-weight: var(--title-weight); font-size: clamp(1.5rem, 3.2vw, 2.75rem); line-height: 1.1; letter-spacing: -0.02em; }
.hero__plain-title::before { content: ""; display: block; width: 48px; height: 4px; margin-bottom: 20px; background: var(--red); }
.hero__text { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--col-gap) 64px; padding-top: 32px; }
.hero__title { margin-top: 10px; font-size: clamp(1.875rem, 3.9vw, 3.375rem); font-weight: var(--title-weight); line-height: 1.06; letter-spacing: var(--tracking-display); }
.hero__title a { color: var(--ink); }
.hero__title a:hover { color: var(--red); }
.hero__aside { padding-top: 30px; }
.hero__excerpt { font-size: 1.0625rem; line-height: 1.55; color: var(--slate); margin-bottom: 16px; }

.hero__head-row { margin-bottom: 20px; }
.hero__tabs {
	display: grid; grid-template-columns: repeat(var(--tabs, 8), minmax(0, 1fr)); gap: 20px;
	margin-top: 40px; list-style: none;
}
.hero__tab { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: start; cursor: pointer; color: var(--quiet); }
.hero__tab-bar { position: relative; display: block; height: 2px; background: var(--line); overflow: hidden; margin-bottom: 14px; }
.hero__tab-bar span { position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left center; }
[dir="rtl"] .hero__tab-bar span { transform-origin: right center; }
.hero__tab-label { display: block; font-size: 0.8125rem; color: var(--red); margin-bottom: 4px; }
.hero__tab-title {
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
	font-size: 0.875rem; line-height: 1.35;
}
.hero__tab:hover .hero__tab-title { color: var(--ink); }
.hero__tab[aria-current="true"] .hero__tab-title { color: var(--ink); }
.hero__tab[aria-current="true"] .hero__tab-bar span { transform: scaleX(1); background: var(--red); }
.hero.is-playing .hero__tab[aria-current="true"] .hero__tab-bar span { animation: cpi-progress var(--slide-ms, 8000ms) linear forwards; }
@keyframes cpi-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero__controls { display: flex; align-items: center; gap: 8px; }
.hero__count { min-width: 3.6em; text-align: center; font-size: 0.875rem; color: var(--slate); word-spacing: -0.1em; direction: ltr; unicode-bidi: isolate; }
.hero__pause .cpi-icon--play { display: none; }
.hero.is-paused .hero__pause .cpi-icon--play { display: block; }
.hero.is-paused .hero__pause .cpi-icon--pause { display: none; }
.no-js .hero__controls, .no-js .hero__tabs { display: none; }

@media (max-width: 1180px) {
	.hero__tabs { display: none; }
}
@media (max-width: 760px) {
	.hero__media { aspect-ratio: 16 / 9; }
	.hero__text { grid-template-columns: minmax(0, 1fr); padding-top: 22px; }
	.hero__aside { padding-top: 0; }
}

/* Institutional top row: About CPI-Geneva (a quarter) beside the Featured slider (three quarters). */
.hero-split { padding-block: clamp(24px, 3.5vw, 40px) clamp(40px, 5vw, 64px); }
.hero-split + .section { border-top: 1px solid var(--line); }
.hero-split__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: clamp(20px, 2.4vw, 36px); align-items: stretch; }
.hero--split { display: flex; padding: 0; min-width: 0; }
/* The strip of stories sits on the same base line as the About panel, whatever the text lengths. */
.hero--split .hero__inner { flex: 1; display: flex; flex-direction: column; }
.hero--split .hero__track { flex: none; }
.hero--split .hero__inner { position: relative; min-width: 0; border-top: 3px solid color-mix(in srgb, var(--ink) 18%, #fff); }
/* The picture starts at the grey rule. On it, level with "About CPI-Geneva": the "Featured" button
   at the start, the counter and arrows at the end, in white. */
.hero-split { --split-pad: clamp(22px, 2.2vw, 30px); --split-row: 40px; }
.hero--split .hero__head-row {
	position: absolute; z-index: 3; top: var(--split-pad); inset-inline: var(--split-pad);
	min-height: var(--split-row); margin: 0; align-items: center; pointer-events: none;
}
.hero--split .hero__head-row > * { pointer-events: auto; }
.hero--split .hero__head-row .side-title {
	display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 2px;
	background: var(--red); color: var(--white); font-size: 0.875rem; line-height: 1; letter-spacing: .01em;
}
.hero--split .round-btn {
	width: var(--split-row); height: var(--split-row); border: 1.5px solid rgba(255, 255, 255, .95); background: rgba(26, 37, 48, .18); color: var(--white);
	-webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.hero--split .round-btn:hover, .hero--split .round-btn:focus-visible { background: var(--white); border-color: var(--white); color: var(--ink); }
.hero--split .round-btn:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.hero--split .hero__count { color: var(--white); font-weight: var(--title-weight); text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
.hero--split .hero__media { position: relative; aspect-ratio: 2.2 / 1; }
/* A light shade at the top keeps the white crisp on any photograph. */
.hero--split .hero__media::after { content: ""; position: absolute; inset: 0 0 auto; height: 38%; pointer-events: none; background: linear-gradient(rgba(10, 16, 22, .5), rgba(10, 16, 22, 0)); }
.hero--split .hero__media--plain::after { display: none; }
.hero-about { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; min-width: 0; padding: var(--split-pad); background: var(--mist); border-top: 3px solid var(--red); }
/* The Cordoba pattern rises faintly from the base of the panel (as in the newsletter masthead). */
.hero-about::after {
	content: ""; position: absolute; inset: auto 0 0 0; height: 58%; z-index: -1; pointer-events: none;
	background: url("assets/brand/pattern.svg") 0 100% / 170px auto repeat;
	-webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, .7), transparent); mask-image: linear-gradient(to top, rgba(0, 0, 0, .7), transparent);
}
[dir="rtl"] .hero-about::after { background-position: 100% 100%; }
@media (max-width: 1100px) { .hero-about::after { height: 70%; opacity: .7; } }
.hero-about__title { margin-bottom: 20px; line-height: var(--split-row); }
.hero-about__lead { margin: 0 0 14px; font-size: clamp(1.125rem, 1.35vw, 1.3125rem); font-weight: var(--title-weight); line-height: 1.35; letter-spacing: -0.005em; color: var(--ink); }
.hero-about__body { margin: 0; font-size: 0.9375rem; line-height: 1.6; color: var(--slate); }
.hero-about__more { margin: 12px 0 0; font-size: 0.9375rem; line-height: 1.6; color: var(--slate); }
.hero-about__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-about__actions .btn { min-height: 40px; padding: 8px 16px; font-size: 0.875rem; }
.hero-about__since { display: grid; gap: 4px; margin: auto 0 0; padding-top: 26px; font-size: 0.8125rem; letter-spacing: .02em; color: var(--slate); }
.hero-about__since strong { font-size: var(--side-title-size); font-weight: var(--title-weight); letter-spacing: 0; color: var(--red); }
.hero--split .hero__title { font-size: clamp(1.625rem, 2.5vw, 2.5rem); }
.hero--split .hero__text { gap: var(--col-gap) 44px; padding-top: 24px; }
.hero--split .hero__aside { padding-top: 18px; }
/* The stories, as a strip of small cards under the slide: four at a time, it follows the slideshow. */
.hero--split .hero__tabs {
	display: flex; gap: 16px; margin: auto 0 0; padding: 28px 0 0;
	overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; touch-action: pan-x pan-y;
}
.hero--split .hero__tabs::-webkit-scrollbar { display: none; }
.hero--split .hero__tabs > li { flex: 0 0 calc((100% - 48px) / 4); min-width: 0; scroll-snap-align: start; }
.hero__tab-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; margin-bottom: 10px; background: var(--mist); }
.hero__tab-thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.55); opacity: .8; transition: filter .3s, opacity .3s; }
.hero__tab:hover .hero__tab-thumb img, .hero__tab[aria-current="true"] .hero__tab-thumb img { filter: none; opacity: 1; }
.hero--split .hero__tab-bar { margin-bottom: 10px; }
@media (max-width: 1180px) {
	.hero--split .hero__tabs { display: flex; }
}
@media (max-width: 1100px) {
	/* Featured first, About after it. */
	.hero-split__grid { grid-template-columns: minmax(0, 1fr); }
	.hero-about { order: 2; }
	.hero--split .hero__tabs > li { flex-basis: calc((100% - 32px) / 3); }
}
@media (max-width: 640px) {
	.hero--split .hero__tabs > li { flex-basis: 62%; }
	.hero-split { --split-row: 34px; --split-pad: 12px; }
	.hero--split .hero__head-row .side-title { height: 30px; padding: 0 10px; font-size: 0.8125rem; }
	.hero--split .hero__media { aspect-ratio: 4 / 3; }
	.hero--split .hero__controls { gap: 4px; }
}

/* About */
.about__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: var(--col-gap) 56px; align-items: center; }
.about__grid--text { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
.about__body { font-size: 1.125rem; color: var(--slate); max-width: 52ch; margin-bottom: 28px; }
.about__media { margin: 0; }
.about__media img { width: 100%; }
@media (max-width: 900px) { .about__grid { grid-template-columns: minmax(0, 1fr); } }

/* Carousels */
.carousel {
	display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * var(--col-gap)) / 4);
	gap: var(--col-gap); list-style: none; overflow-x: auto; scroll-snap-type: x mandatory;
	scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; padding-bottom: 4px;
	overflow-y: hidden; touch-action: pan-x pan-y;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel > li { scroll-snap-align: start; min-width: 0; }
@media (max-width: 1100px) { .carousel { grid-auto-columns: calc((100% - 2 * var(--col-gap)) / 2.6); } }
@media (max-width: 640px) { .carousel { grid-auto-columns: 82%; gap: 20px; } .carousel-nav { display: none; } }

/* Cordoba Updates */
.updates__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--col-gap) 56px; }
.updates__list { display: flex; flex-direction: column; gap: 28px; }
.updates__list > .card + .card { padding-top: 28px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .updates__grid { grid-template-columns: minmax(0, 1fr); } }

/* Programmes tabs */
.tabs--buttons {
	display: flex; gap: 28px; margin-bottom: 40px; border-bottom: 1px solid var(--line);
	overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.tabs--buttons::-webkit-scrollbar { display: none; }
.tabs--buttons button {
	flex-shrink: 0; padding: 0 0 14px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent;
	background: none; cursor: pointer; font-size: 0.9375rem; color: var(--slate); white-space: nowrap;
}
.tabs--buttons button:hover { color: var(--ink); }
.tabs--buttons button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--red); }
.no-js .tabs--buttons { display: none; }
.no-js .tab-panel[hidden] { display: block; margin-top: 48px; }
.tab-panel__more { margin: 40px 0 0; }

/* Methodology */
.statement--title { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 18px; }
.methodology__lead { font-size: 1.1875rem; color: var(--slate); max-width: 58ch; margin-bottom: 56px; }
.methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px var(--col-gap); }
.method { padding-top: 20px; border-top: 1px solid var(--ink); }
.method__title { font-size: 1.1875rem; margin-bottom: 10px; }
.method p { font-size: 0.9375rem; line-height: 1.6; color: var(--slate); margin-bottom: 14px; }
@media (max-width: 1000px) { .methods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .methods { grid-template-columns: minmax(0, 1fr); } }

/* Why support: toggles */
.support__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); gap: var(--col-gap) 56px; align-items: start; }
.support__intro .statement { margin-bottom: 32px; font-size: clamp(1.375rem, 2.1vw, 1.75rem); line-height: 1.3; }
@media (max-width: 1000px) { .support__grid { grid-template-columns: minmax(0, 1fr); } }
.toggles { border-top: 1px solid var(--ink); }
.toggle { border-bottom: 1px solid var(--line); }
.toggle summary {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 20px 0; cursor: pointer; list-style: none; font-size: 1.1875rem; line-height: 1.35;
}
.toggle summary::-webkit-details-marker { display: none; }
.toggle summary:hover { color: var(--red); }
.toggle summary .cpi-icon { color: var(--red); transition: transform .2s var(--ease); }
.toggle[open] summary .cpi-icon { transform: rotate(45deg); }
.toggle__body { padding: 0 0 24px; font-size: 1rem; line-height: 1.65; color: var(--slate); max-width: 62ch; }
.toggle__body ul { padding-inline-start: 1.1em; }
.toggle__body li { margin-bottom: 6px; }
.toggle__body li::marker { color: var(--red); }

/* =================================================================
   7. Archives (blog, categories, search)
   ================================================================= */
.archive-head { padding-block: clamp(48px, 7vw, 88px) 32px; }
.archive-head .crumbs { margin-bottom: 20px; }
.archive-head__title { font-size: clamp(2.75rem, 7vw, 5.5rem); font-weight: var(--title-weight); line-height: 1; letter-spacing: -0.03em; }
.archive-head__desc { margin-top: 20px; font-size: 1.25rem; line-height: 1.5; color: var(--slate); max-width: 58ch; }
.archive-head__desc p:last-child { margin: 0; }
.archive-head__search { margin-top: 32px; }
.archive-head__count { margin-top: 16px; font-size: 0.9375rem; color: var(--slate); }

.tabs ul { display: flex; gap: 28px; list-style: none; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs ul::-webkit-scrollbar { display: none; }
.tabs li { flex-shrink: 0; }
.tabs a { display: block; padding: 0 0 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: 0.9375rem; color: var(--slate); white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--red); }

.listing { padding-block: 48px clamp(64px, 8vw, 104px); }
.feature {
	display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--col-gap) 56px; align-items: center;
	padding-bottom: 56px; margin-bottom: 56px; border-bottom: 1px solid var(--line);
}
.feature__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--mist); }
.feature__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.feature:hover .feature__media img { transform: scale(1.02); }
.feature__body > * + * { margin-top: 12px; }
.feature__title { font-size: clamp(1.75rem, 3.2vw, 2.625rem); font-weight: var(--title-weight); line-height: 1.12; letter-spacing: var(--tracking-display); }
.feature__title a:hover { color: var(--red); }
.feature__excerpt { font-size: 1.0625rem; line-height: 1.6; color: var(--slate); }
@media (max-width: 860px) { .feature { grid-template-columns: minmax(0, 1fr); } }

.pagination { margin-top: 72px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pagination .page-numbers {
	display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding-inline: 12px;
	border: 1px solid var(--line); border-radius: 2px; font-size: 0.9375rem; font-variant-numeric: tabular-nums;
}
.pagination a.page-numbers:hover { border-color: var(--ink); color: var(--ink); }
.pagination .current { background: var(--ink); border-color: var(--ink); color: var(--white); }
.pagination .dots { border: 0; }
.empty { color: var(--slate); }

/* Subscribe band (points to the footer form) */
.band { border-top: 1px solid var(--line); padding-block: clamp(48px, 6vw, 72px); }
.band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.band__title { font-size: clamp(1.5rem, 2.6vw, 2.125rem); font-weight: var(--title-weight); letter-spacing: var(--tracking-display); line-height: 1.2; }
.band__text { margin: 8px 0 0; color: var(--slate); max-width: 56ch; }

/* =================================================================
   8. Posts and pages
   ================================================================= */
.crumbs ol { display: flex; flex-wrap: wrap; list-style: none; font-size: 0.875rem; color: var(--quiet); }
.crumbs li + li::before { content: "/"; margin-inline: 10px; color: var(--line); }
.crumbs a { color: var(--slate); }
.crumbs a:hover { color: var(--red); }

.entry-head { padding-block: clamp(40px, 6vw, 72px) clamp(36px, 4vw, 48px); }
.entry-head .crumbs { margin-bottom: 28px; }
.entry-title { max-width: 21ch; font-size: clamp(2.375rem, 5.4vw, 4.5rem); font-weight: var(--title-weight); line-height: 1.04; letter-spacing: -0.03em; }
.entry-deck { max-width: 44ch; margin: 24px 0 0; font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 400; line-height: 1.4; color: var(--slate); }
.byline {
	display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 32px 0 0; padding-top: 20px;
	border-top: 1px solid var(--line); font-size: 0.9375rem; color: var(--slate);
}
.byline a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .25em; }
.byline a:hover { color: var(--red); text-decoration-color: currentColor; }

.entry-hero { margin-top: 0; margin-bottom: clamp(40px, 5vw, 64px); }
.entry-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.entry-hero figcaption, .entry-content figcaption, .wp-caption-text { margin-top: 10px; font-size: 0.8125rem; line-height: 1.5; color: var(--quiet); }

.page-hero { margin: 0; height: clamp(240px, 38vw, 540px); background: var(--mist); overflow: hidden; }
.page-hero img { width: 100%; height: 100%; object-fit: cover; }
.entry--page .entry-head { padding-top: clamp(40px, 5vw, 64px); }

.entry-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); padding-bottom: clamp(64px, 8vw, 104px); }
.entry-aside { grid-column: 1 / span 3; }
.entry-body { grid-column: 4 / span 7; min-width: 0; }
.entry-aside__sticky { position: sticky; top: calc(var(--masthead-h) + var(--admin-bar) + 32px); display: flex; flex-direction: column; gap: 36px; max-height: calc(100vh - var(--masthead-h) - var(--admin-bar) - 64px); overflow-y: auto; scrollbar-width: thin; padding-bottom: 8px; }

/* Post header (VIP style): title, standfirst and byline left; featured image right */
.post-hero { background: var(--mist); padding-block: clamp(36px, 5vw, 72px); margin-bottom: clamp(48px, 6vw, 80px); }
.post-hero__inner { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: center; }
.post-hero__text { grid-column: 1 / span 9; min-width: 0; }
.post-hero.has-media .post-hero__text { grid-column: 1 / span 6; padding-inline-end: clamp(0px, 2vw, 24px); }
.post-hero__media { grid-column: 7 / -1; margin: 0; min-width: 0; }
.post-hero__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.post-hero__media figcaption { margin-top: 10px; font-size: 0.8125rem; line-height: 1.5; color: var(--quiet); }
.post-hero .crumbs { margin-bottom: 24px; }
.post-hero .entry-title { max-width: none; font-size: clamp(2.125rem, 3.7vw, 3.375rem); line-height: 1.06; }
.post-hero:not(.has-media) .entry-title { font-size: clamp(2.375rem, 5vw, 4.25rem); max-width: 20ch; }
.post-hero .entry-deck { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); max-width: 40ch; margin-top: 20px; }
.post-hero .byline { margin-top: 28px; border-top-color: color-mix(in srgb, var(--ink) 16%, #fff); }
@media (max-width: 900px) {
	.post-hero__inner { display: block; }
	.post-hero__media { margin-top: 32px; }
}

/* Table of contents */
.toc__title, .share__title, .aside-block__title { margin: 0 0 12px; font-size: 0.875rem; font-weight: 450; color: var(--red); }
.toc__list, .toc__list ol { list-style: none; }
.toc__list a {
	display: block; padding: 6px 0 6px 14px; border-inline-start: 2px solid var(--line);
	font-size: 0.875rem; line-height: 1.4; color: var(--slate); transition: color .15s, border-color .15s;
}
[dir="rtl"] .toc__list a { padding: 6px 14px 6px 0; }
.toc__list ol a { padding-inline-start: 28px; font-size: 0.8125rem; }
.toc__list a:hover { color: var(--ink); }
.toc__list a.is-active { color: var(--ink); border-inline-start-color: var(--red); }

.share ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.share a, .share button {
	display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
	border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--slate); cursor: pointer;
	transition: border-color .15s, color .15s;
}
.share a:hover, .share button:hover { border-color: var(--ink); color: var(--ink); }
.share button.is-done { border-color: var(--red); color: var(--red); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.chips a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 2px; font-size: 0.8125rem; color: var(--slate); }
.chips a:hover { border-color: var(--ink); color: var(--ink); }

.toc-mobile, .entry-share-mobile { display: none; }

@media (max-width: 1000px) {
	.entry-layout { display: block; }
	.entry-aside { display: none; }
	.toc-mobile { display: block; margin-bottom: 36px; border-block: 1px solid var(--line); }
	.toc-mobile summary { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; cursor: pointer; list-style: none; font-size: 0.9375rem; font-weight: 450; color: var(--red); }
	.toc-mobile summary::-webkit-details-marker { display: none; }
	.toc-mobile[open] summary .cpi-icon { transform: rotate(180deg); }
	.toc-mobile .toc { padding-bottom: 16px; }
	.toc-mobile .toc__title { display: none; }
	.entry-share-mobile { display: block; margin-top: 40px; }
}
@media (min-width: 1001px) {
	.entry-layout--plain .entry-body { grid-column: 4 / span 7; }
}

/* Article typography */
.entry-content { font-size: 1.125rem; line-height: 1.7; }
.entry-content > * { margin-block: 0 1.35em; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2 { margin-block: 2.2em 0.6em; font-size: clamp(1.625rem, 2.6vw, 2rem); line-height: 1.2; letter-spacing: -0.01em; }
.entry-content h3 { margin-block: 1.9em 0.5em; font-size: 1.4375rem; line-height: 1.3; }
.entry-content h4 { margin-block: 1.7em 0.4em; font-size: 1.1875rem; font-weight: 450; }
.entry-content h2:first-child, .entry-content h3:first-child { margin-top: 0; }
.entry-content a { color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.entry-content a:hover { color: var(--red-deep); text-decoration-thickness: 2px; }
strong, b { font-weight: 450; }
.entry-content strong, .entry-content b { font-weight: 450; }
.entry-content ul, .entry-content ol { padding-inline-start: 1.25em; }
.entry-content li { margin-bottom: 0.45em; }
.entry-content li::marker { color: var(--red); }
.entry-content blockquote, .entry-content .wp-block-quote {
	margin-inline: 0; padding-inline-start: 24px; border-inline-start: 3px solid var(--red);
	font-size: 1.375rem; font-weight: 400; line-height: 1.45; letter-spacing: -0.005em;
}
.entry-content blockquote p:last-of-type { margin-bottom: 0; }
.entry-content blockquote cite, .entry-content .wp-block-quote cite { display: block; margin-top: 12px; font-size: 0.875rem; font-style: normal; color: var(--slate); }
.entry-content .wp-block-pullquote { border-block: 1px solid var(--ink); padding: 32px 0; text-align: start; }
.entry-content .wp-block-pullquote blockquote { border: 0; padding: 0; font-size: 1.75rem; }
.entry-content figure { margin-inline: 0; }
.entry-content img { height: auto; }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin-block: 3em; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.entry-content th, .entry-content td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.entry-content th { font-weight: 450; }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content pre { overflow-x: auto; padding: 16px; background: var(--mist); font-size: 0.875rem; }
.entry-content .wp-block-button__link { border-radius: 2px; background: var(--red); color: var(--white); text-decoration: none; padding: 12px 20px; font-size: 0.9375rem; }
.entry-content .wp-block-button__link:hover { background: var(--red-deep); color: var(--white); }
/* Theme buttons inside article text keep their own colours (the text-link red would win otherwise). */
.entry-content a.btn { text-decoration: none; }
.entry-content a.btn--red, .entry-content a.btn--red:hover, .entry-content a.btn--ink, .entry-content a.btn--ink:hover { color: var(--white); }
.entry-content .is-style-outline .wp-block-button__link { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.entry-content .wp-block-file a:not(.wp-block-file__button) { font-weight: 450; }
.entry-content .wp-block-file__button { border-radius: 2px; background: var(--ink); color: var(--white); text-decoration: none; }
.entry-content .alignleft { float: inline-start; margin-inline-end: 24px; max-width: 50%; }
.entry-content .alignright { float: inline-end; margin-inline-start: 24px; max-width: 50%; }
.entry-content .aligncenter { margin-inline: auto; }
.entry-content .alignwide, .entry-content .alignfull { max-width: none; }
.entry-content iframe { width: 100%; }
.entry-content .wp-block-embed__wrapper iframe { aspect-ratio: 16 / 9; height: auto; }
.entry-content .has-red-color { color: var(--red); }
.entry-content .has-ink-color { color: var(--ink); }
.entry-content .has-slate-color { color: var(--slate); }
.entry-content .has-mist-background-color { background: var(--mist); }
.entry-content .has-background { padding: clamp(20px, 3vw, 32px); }
.entry-content--wide > * { max-width: 820px; }

.entry-tags { margin-top: 48px; }
.entry-updated { margin: 56px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--quiet); }
.page-links { margin-top: 32px; display: flex; gap: 8px; }

.author-box { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 24px; margin-top: 56px; padding-block: 32px; border-block: 1px solid var(--line); }
.author-box__avatar { width: 96px; height: 96px; object-fit: cover; }
.author-box__label { margin: 0 0 4px; font-size: 0.8125rem; color: var(--quiet); }
.author-box__name { font-size: 1.375rem; margin-bottom: 8px; }
.author-box__bio { margin: 0; font-size: 0.9375rem; line-height: 1.6; color: var(--slate); }

.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--col-gap); margin-top: 56px; }
.post-nav__link { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--ink); color: var(--ink); }
.post-nav__link--next { grid-column: 2; text-align: end; align-items: flex-end; }
.post-nav__label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--quiet); }
.post-nav__title { font-size: 1.0625rem; line-height: 1.35; }
.post-nav__link:hover .post-nav__title { color: var(--red); }
@media (max-width: 600px) { .post-nav { grid-template-columns: minmax(0, 1fr); } .post-nav__link--next { grid-column: auto; } }

.related { background: var(--mist); border-top: 0 !important; }

/* Comments */
.comments-wrap { padding-bottom: 72px; }
.comments { max-width: 720px; margin-inline-start: calc((100% + var(--col-gap)) * 3 / 12); }
@media (max-width: 1000px) { .comments { margin-inline-start: 0; } }
.comments__title { font-size: 1.5rem; margin-bottom: 24px; }
.comment-list { list-style: none; }
.comment-list .children { list-style: none; padding-inline-start: 24px; }
.comment-body { padding-block: 20px; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea {
	width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 2px; font: inherit;
}
.comment-form input[type="submit"] { padding: 12px 20px; border: 0; border-radius: 2px; background: var(--ink); color: var(--white); font: inherit; cursor: pointer; }

/* =================================================================
   9. Footer
   ================================================================= */
.site-footer { background: var(--mist); border-top: 1px solid var(--line); padding-top: clamp(56px, 7vw, 80px); font-size: 0.9375rem; }
.footer__top { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); gap: 48px; }
.footer__address { display: flex; flex-direction: column; gap: 4px; margin-top: 28px; font-style: normal; font-size: 0.875rem; line-height: 1.55; color: var(--slate); }
.footer__address a { color: var(--slate); }
.footer__address a:hover { color: var(--red); }

.footer__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.footer__label { margin: 0 0 16px; font-size: 0.875rem; font-weight: 450; color: var(--ink); }
.footer__col ul { list-style: none; }
.footer__col li { margin-bottom: 11px; }
.footer__col a { font-size: 0.875rem; line-height: 1.4; color: var(--slate); }
.footer__col a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .25em; }

/* Mailing list box (bottom right) – also styles common plugin forms */
.newsletter { padding: 28px; background: var(--white); border: 1px solid var(--line); }
.newsletter__title, .newsletter .widget-title, .newsletter h2, .newsletter h3 { margin: 0 0 8px; font-size: 1.1875rem; font-weight: var(--title-weight); line-height: 1.3; }
.newsletter__text, .newsletter p { font-size: 0.875rem; line-height: 1.55; color: var(--slate); }
.newsletter__form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.newsletter input[type="email"], .newsletter input[type="text"], .newsletter input[type="tel"], .newsletter select {
	width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 2px;
	background: var(--white); color: var(--ink); font: inherit; font-size: 0.9375rem;
}
.newsletter input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.newsletter button, .newsletter input[type="submit"], .newsletter .wp-block-button__link {
	width: 100%; min-height: 46px; padding: 10px 18px; border: 0; border-radius: 2px;
	background: var(--ink); color: var(--white); font: inherit; font-size: 0.9375rem; cursor: pointer;
}
.newsletter button:hover, .newsletter input[type="submit"]:hover { background: var(--red); }
.newsletter label { font-size: 0.8125rem; color: var(--slate); }
.newsletter .widget + .widget { margin-top: 20px; }
.newsletter__note { margin: 14px 0 0; font-size: 0.75rem !important; line-height: 1.5; color: var(--quiet) !important; }
.newsletter__done { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--ink) !important; }
.newsletter__done .cpi-icon { color: var(--red); }
.hp { position: absolute; inset-inline-start: -9999px; }
.admin-hint { margin: 14px 0 0; padding: 8px 10px; border: 1px dashed var(--red); font-size: 0.75rem !important; color: var(--red) !important; }

.footer__partners { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.footer__partners .footer__label { margin-bottom: 20px; }
.footer__partners img { max-height: 52px; width: auto; filter: grayscale(1); opacity: .8; transition: filter .2s, opacity .2s; }
.footer__partners a:hover img { filter: none; opacity: 1; }
.footer__partners .wp-block-gallery, .footer__partners .wp-block-group { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 48px; }

.footer__bottom {
	display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px;
	margin-top: 56px; padding-block: 22px 28px; border-top: 1px solid var(--line);
	font-size: 0.8125rem; color: var(--slate);
}
.footer__copy { margin: 0; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; }
.footer__legal a { color: var(--slate); }
.footer__legal a:hover { color: var(--red); }
.langs--footer { margin-inline-start: auto; }

@media (max-width: 1100px) {
	.footer__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.footer__cols { grid-column: 1 / -1; grid-row: 2; }
	.footer__newsletter { grid-column: 2; grid-row: 1; }
}
@media (max-width: 700px) {
	.footer__top { grid-template-columns: minmax(0, 1fr); }
	.footer__cols { grid-column: auto; grid-row: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.footer__newsletter { grid-column: auto; grid-row: auto; }
	.langs--footer { margin-inline-start: 0; }
}

/* =================================================================
   9b. Team: portraits, biography panel, member page
   ================================================================= */
.entry--team .entry-head { padding-bottom: clamp(28px, 3.5vw, 44px); }
.team-intro { margin-bottom: clamp(40px, 5vw, 64px); }
.team-intro > * { max-width: 68ch; }
.team-wrap { padding-bottom: clamp(72px, 9vw, 120px); }
.team-empty { padding: 32px; background: var(--mist); color: var(--slate); }
.entry-content .team { margin-block: 40px; }

/* Group filter: stays under the header while scrolling the team */
.team-filter {
	position: sticky; z-index: 5; top: calc(var(--admin-bar) + var(--masthead-h));
	display: flex; gap: 28px; margin-bottom: clamp(40px, 5vw, 56px);
	border-bottom: 1px solid var(--line); background: var(--white);
	overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.team-filter::-webkit-scrollbar { display: none; }
.team-filter__btn {
	position: relative; flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
	min-height: 52px; padding: 0; border: 0; background: none; color: var(--slate);
	font-size: 0.9375rem; cursor: pointer; white-space: nowrap;
}
.team-filter__btn::after {
	content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 2px;
	background: var(--red); transform: scaleX(0); transition: transform .25s var(--ease);
}
.team-filter__btn:hover { color: var(--ink); }
.team-filter__btn[aria-pressed="true"] { color: var(--ink); }
.team-filter__btn[aria-pressed="true"]::after { transform: scaleX(1); }
.team-filter__n { font-size: 0.75rem; color: var(--quiet); }
.team-filter + .team-group > .team-group__head { padding-top: 0; border-top: 0; }
.team-group[hidden] { display: none; }

.team-group + .team-group { margin-top: clamp(64px, 8vw, 104px); }
.team-group__head {
	display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap);
	padding-top: 18px; margin-bottom: clamp(28px, 3.5vw, 40px); border-top: 1px solid var(--ink);
}
.team-group__head .side-title { grid-column: 1 / span 3; }
.team-group__desc { grid-column: 4 / span 7; margin: 0; color: var(--slate); }
@media (max-width: 900px) {
	.team-group__head { display: block; }
	.team-group__desc { margin-top: 10px; }
}

/* Portrait grid */
.team-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 56px var(--col-gap); list-style: none; }
@media (max-width: 1100px) { .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 16px; } }

.member { min-width: 0; }
.member__link { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.member__link:hover { color: var(--ink); }
.member__link:focus-visible { outline-offset: 6px; }
.member__photo {
	position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--mist);
	isolation: isolate;
}
.member__photo img {
	width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%;
	transition: transform .7s var(--ease), filter .5s var(--ease);
}
.member__photo::after {
	content: ""; position: absolute; z-index: 3; inset-inline: 0; bottom: 0; height: 4px; background: var(--red);
	transform: scaleX(0); transform-origin: var(--from, left); transition: transform .45s var(--ease);
}
[dir="rtl"] .member__photo::after { --from: right; }
.member__initials {
	display: grid; place-items: center; width: 100%; height: 100%;
	font-size: clamp(2.25rem, 5vw, 3.75rem); letter-spacing: -0.02em; color: var(--red);
}
.member__plus {
	position: absolute; z-index: 2; inset-block-end: 12px; inset-inline-end: 12px;
	display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
	background: var(--white); color: var(--ink); box-shadow: 0 2px 10px rgba(26, 37, 48, .12);
	transition: transform .35s var(--ease), background-color .2s, color .2s, opacity .2s;
}
.member__name { margin-top: 18px; font-size: 1.1875rem; font-weight: 450; line-height: 1.25; letter-spacing: -0.005em; transition: color .15s; }
.member__role { margin-top: 4px; font-size: 0.9375rem; line-height: 1.4; color: var(--slate); }

/* Short biography on hover (mouse) / keyboard focus; a tap opens the panel instead */
.member__peek {
	position: absolute; z-index: 1; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
	padding: clamp(16px, 2vw, 24px); color: var(--white);
	background: linear-gradient(to top, color-mix(in srgb, var(--ink) 96%, transparent) 0%, color-mix(in srgb, var(--ink) 88%, transparent) 55%, color-mix(in srgb, var(--ink) 30%, transparent) 100%);
	opacity: 0; transform: translateY(10px); transition: opacity .35s var(--ease), transform .45s var(--ease);
	pointer-events: none;
}
.member__peek-text {
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; overflow: hidden;
	font-size: 0.9375rem; line-height: 1.5;
}
.member__peek-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 0.875rem; color: var(--white); }
.member__peek-more .cpi-icon { color: var(--red); }
@media (hover: hover) and (pointer: fine) {
	.member__link:hover .member__photo img { transform: scale(1.04); }
	.member__link:hover .member__peek,
	.member__link:focus-visible .member__peek { opacity: 1; transform: none; }
	.member__link:hover .member__plus,
	.member__link:focus-visible .member__plus { opacity: 0; transform: rotate(90deg) scale(.6); }
}
@media (hover: none), (pointer: coarse) {
	.member__peek { display: none; }
}
.member__link:hover .member__photo::after,
.member__link:focus-visible .member__photo::after { transform: scaleX(1); }
.member__link:hover .member__name { color: var(--red); }
.team--mono .member__photo img { filter: grayscale(1) contrast(1.04); }
.team--mono .member__link:hover .member__photo img,
.team--mono .member__link:focus-visible .member__photo img { filter: none; }

/* Biography panel (a side sheet; a full screen on phones) */
html.has-bio-open { overflow: hidden; }
.bio {
	position: fixed; inset-block: 0; inset-inline-start: auto; inset-inline-end: 0;
	width: min(620px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0;
	border: 0; background: var(--white); color: var(--ink);
	box-shadow: -24px 0 64px -32px rgba(26, 37, 48, .45);
}
.bio[open] { display: flex; flex-direction: column; animation: bio-in .45s var(--ease); }
[dir="rtl"] .bio[open] { animation-name: bio-in-rtl; }
.bio::backdrop { background: color-mix(in srgb, var(--ink) 55%, transparent); backdrop-filter: blur(2px); animation: bio-fade .3s ease; }
@keyframes bio-in { from { transform: translateX(48px); opacity: 0; } }
@keyframes bio-in-rtl { from { transform: translateX(-48px); opacity: 0; } }
@keyframes bio-fade { from { opacity: 0; } }
@keyframes bio-swap { from { opacity: 0; transform: translateY(8px); } }
.bio__bar {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 14px clamp(20px, 4vw, 40px); border-bottom: 1px solid var(--line);
}
.bio { font-family: var(--font); }
.bio__count { font-size: 0.9375rem; color: var(--quiet); white-space: nowrap; }
.bio__nav { display: flex; gap: 8px; }
.bio__close { margin-inline-start: 8px; background: var(--ink); border-color: var(--ink); color: var(--white); }
.bio__close:hover { background: var(--red); border-color: var(--red); color: var(--white); }
.bio__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: clamp(28px, 4vw, 44px) clamp(20px, 4vw, 40px) 56px; outline: none; }
.bio__body.is-swapping .bio__card { animation: bio-swap .35s var(--ease); }
.bio__top { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 28px; align-items: end; }
.bio__photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--mist); }
.bio__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.bio__photo .member__initials { font-size: 2.25rem; }
.bio__id .label { margin: 0 0 10px; }
.bio__name { font-size: clamp(1.75rem, 3.2vw, 2.375rem); line-height: 1.08; letter-spacing: -0.025em; }
.bio__role { margin: 10px 0 0; font-size: 1.0625rem; color: var(--slate); }
.bio__lead { margin: 36px 0 0; font-size: 1.25rem; line-height: 1.45; }
.bio__text { margin-top: 24px; font-size: 1.0625rem; line-height: 1.7; }
.bio__lead + .bio__text { padding-top: 24px; border-top: 1px solid var(--line); }
.bio__foot {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
	margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line);
}
@media (max-width: 520px) {
	.bio__top { grid-template-columns: 104px minmax(0, 1fr); gap: 18px; }
	.bio__nav { gap: 6px; }
}

.member-links { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; }
.member-links a, .post-hero .member-links a { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9375rem; color: var(--ink); }
.member-links a:hover { color: var(--red); }
.member-links .cpi-icon { color: var(--red); }

/* A member's own page */
.member-hero.has-media .post-hero__text { grid-column: 1 / span 7; }
.member-hero__photo { grid-column: 9 / -1; }
.member-hero__photo img { aspect-ratio: 4 / 5; height: auto; object-position: 50% 22%; }
.member-hero__photo .member__initials { aspect-ratio: 4 / 5; height: auto; background: var(--white); font-size: 5rem; }
.member-hero .label { margin: 0 0 14px; }
.member-hero .entry-title { font-size: clamp(2.375rem, 4.6vw, 4rem); }
.member-hero .member-links { margin-top: 32px; padding-top: 24px; border-top: 1px solid color-mix(in srgb, var(--ink) 16%, #fff); }
.member-page__lead { font-size: 1.3125rem; line-height: 1.45; }
.member-page__back { margin-top: 48px; }
.member-more { padding-block: clamp(56px, 7vw, 88px) clamp(72px, 9vw, 112px); }
@media (max-width: 900px) {
	.member-hero__photo { max-width: 380px; }
}
@media print {
	.team-filter, .member__peek, .member__plus, .bio { display: none !important; }
}

/* =================================================================
   9c. Partners: carousel above the footer, Partners page
   ================================================================= */
.partners-strip { padding-block: clamp(48px, 6vw, 72px) clamp(52px, 6.5vw, 80px); border-top: 1px solid var(--line); background: var(--white); }
.partners-strip__head {
	display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 8px 24px;
	margin-bottom: clamp(28px, 3.5vw, 40px); text-align: center;
}
.partners-strip__title { font-size: 1rem; font-weight: 400; line-height: 1.4; color: var(--quiet); letter-spacing: 0.005em; }
.partners-strip__all { font-size: 0.875rem; color: var(--slate); }

.marquee {
	position: relative; display: flex; overflow: hidden; direction: ltr;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.marquee__track {
	flex-shrink: 0; display: flex; align-items: center; gap: clamp(48px, 6vw, 88px);
	padding-inline-end: clamp(48px, 6vw, 88px); list-style: none;
	animation: cpi-marquee var(--marquee-duration, 60s) linear infinite;
	will-change: transform;
}
[dir="rtl"] .marquee__track { animation-direction: reverse; } /* Arabic: logos travel the other way */
/* Pause: mouse pointer over it, keyboard focus in it, or a finger on it (set by partners.js) */
@media (hover: hover) and (pointer: fine) {
	.marquee:hover .marquee__track { animation-play-state: paused; }
}
.marquee:has(:focus-visible) .marquee__track,
.marquee.is-paused .marquee__track { animation-play-state: paused; }
@keyframes cpi-marquee { to { transform: translateX(-100%); } }
.marquee__item { flex-shrink: 0; display: flex; align-items: center; min-height: 92px; }
.partner-logo { display: flex; align-items: center; justify-content: center; padding: 8px; border-radius: 2px; }
.partner-logo img { display: block; width: var(--w); height: auto; max-width: none; object-fit: contain; filter: grayscale(1) contrast(1.05); opacity: .55; transition: filter .35s var(--ease), opacity .35s var(--ease), transform .35s var(--ease); }
@media (hover: hover) and (pointer: fine) {
	.partner-logo:hover img { filter: none; opacity: 1; transform: scale(1.04); }
}
.partner-logo:focus-visible img,
.partner-logo.is-touched img { filter: none; opacity: 1; transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) {
	.marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; scrollbar-width: thin; }
	.marquee__track { animation: none; }
	.marquee__track + .marquee__track { display: none; }
}

/* Partners page */
.partners-head {
	display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end;
	padding-block: clamp(40px, 6vw, 72px) clamp(32px, 4vw, 48px);
}
.partners-head__text { grid-column: 1 / span 9; min-width: 0; }
.partners-head .crumbs { margin-bottom: 28px; }
.partners-head__count { grid-column: 10 / -1; margin: 0; display: flex; flex-direction: column; align-items: flex-end; text-align: end; color: var(--red); }
.partners-head__num { font-size: clamp(4rem, 9vw, 7.5rem); font-weight: var(--title-weight); line-height: .9; letter-spacing: -0.04em; }
.partners-head__unit { margin-top: 10px; font-size: 0.9375rem; color: var(--slate); }
@media (max-width: 900px) {
	.partners-head { display: block; }
	.partners-head__count { flex-direction: row; align-items: baseline; gap: 12px; margin-top: 28px; justify-content: flex-start; }
	.partners-head__num { font-size: 3.5rem; }
}
.partners-body { padding-bottom: clamp(72px, 9vw, 112px); }
.partners-bar {
	position: sticky; z-index: 5; top: calc(var(--admin-bar) + var(--masthead-h));
	display: flex; align-items: center; justify-content: space-between; gap: 16px 32px;
	margin-bottom: clamp(32px, 4vw, 48px); border-bottom: 1px solid var(--line); background: var(--white);
}
.partners-bar .team-filter { position: static; margin: 0; border: 0; flex: 1; min-width: 0; }
.partners-view { display: flex; gap: 4px; flex-shrink: 0; }
.partners-view__btn {
	display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 2px;
	background: none; color: var(--quiet); font-size: 0.875rem; cursor: pointer; transition: color .15s, background-color .15s;
}
.partners-view__btn:hover { color: var(--ink); }
.partners-view__btn[aria-pressed="true"] { color: var(--ink); background: var(--mist); }
@media (max-width: 640px) { .partners-view__btn span { display: none; } }

/* Logo wall: equal tiles on a hairline grid */
.pwall {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none;
	border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line);
}
@media (max-width: 1100px) { .pwall { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .pwall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pwall__item { min-width: 0; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pwall__item > .ptile { min-width: 0; overflow: hidden; }
.pwall__item[hidden] { display: none; }
.ptile {
	position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; aspect-ratio: 5 / 4;
	padding: clamp(14px, 1.8vw, 22px); color: var(--ink); text-decoration: none; background: var(--white);
	transition: background-color .3s var(--ease);
}
.ptile::after {
	content: ""; position: absolute; inset-inline: -1px; bottom: -1px; height: 3px; background: var(--red);
	transform: scaleX(0); transform-origin: var(--from, left); transition: transform .4s var(--ease);
}
[dir="rtl"] .ptile::after { --from: right; }
.ptile__type { padding-inline-end: 28px; font-size: 0.75rem; line-height: 1.3; color: var(--quiet); transition: color .2s; }
.ptile__logo { flex: 1; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; padding-block: 12px; }
.ptile__logo img { display: block; width: min(var(--w), 100%); height: auto; max-width: 100%; object-fit: contain; filter: grayscale(1) contrast(1.05); opacity: .6; transition: filter .4s var(--ease), opacity .4s var(--ease), transform .5s var(--ease); }
.ptile__wordmark { font-size: 1.125rem; font-weight: var(--title-weight); line-height: 1.25; text-align: center; color: var(--slate); max-width: 16ch; }
.ptile__name {
	font-size: 0.875rem; line-height: 1.35; color: var(--slate);
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.ptile__desc { display: none; }
.ptile__go {
	position: absolute; inset-block-start: clamp(12px, 1.6vw, 18px); inset-inline-end: clamp(12px, 1.6vw, 18px);
	display: inline-flex; align-items: center; gap: 6px; color: var(--red);
	opacity: 0; transform: translate(-4px, 4px); transition: opacity .3s var(--ease), transform .3s var(--ease);
}
[dir="rtl"] .ptile__go { transform: translate(4px, 4px); }
.ptile__domain { display: none; font-size: 0.875rem; color: var(--slate); }
/* Colour: mouse over it (real pointers only, so it never sticks on phones), keyboard
   focus, or a finger on it (.is-touched, set by partners.js). Grey otherwise, everywhere. */
a.ptile:focus-visible, a.ptile.is-touched { background: var(--mist); color: var(--ink); }
a.ptile:focus-visible .ptile__logo img, a.ptile.is-touched .ptile__logo img { filter: none; opacity: 1; transform: scale(1.03); }
a.ptile:focus-visible .ptile__type, a.ptile.is-touched .ptile__type { color: var(--red); }
a.ptile:focus-visible .ptile__go, a.ptile.is-touched .ptile__go { opacity: 1; transform: none; }
a.ptile:focus-visible::after, a.ptile.is-touched::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
	a.ptile:hover { background: var(--mist); color: var(--ink); }
	a.ptile:hover .ptile__logo img { filter: none; opacity: 1; transform: scale(1.03); }
	a.ptile:hover .ptile__type { color: var(--red); }
	a.ptile:hover .ptile__go { opacity: 1; transform: none; }
	a.ptile:hover::after { transform: scaleX(1); }
	}
a.ptile:focus-visible { outline-offset: -2px; }
/* Phones: the small arrow stays visible so each tile reads as a link. */
@media (hover: none), (pointer: coarse) { .ptile__go { opacity: 1; transform: none; } }

/* A–Z list view: same items, set as an index */
.pwall[data-view="list"] { display: block; border-inline-start: 0; }
.pwall[data-view="list"] .pwall__item { border-inline-end: 0; }
.pwall[data-view="list"] .ptile {
	display: grid; grid-template-columns: 164px minmax(0, 1fr) minmax(0, 15rem) minmax(0, 13rem); align-items: center; gap: 4px 32px;
	aspect-ratio: auto; padding: 18px 12px;
}
.pwall[data-view="list"] .ptile__logo { grid-column: 1; grid-row: 1 / span 2; padding: 0; justify-content: flex-start; }
.pwall[data-view="list"] .ptile__logo img { width: min(calc(var(--w) * .6), 144px); max-height: 52px; }
.pwall[data-view="list"] .ptile__wordmark { font-size: 0.875rem; text-align: start; }
.pwall[data-view="list"] .ptile__name { grid-column: 2; grid-row: 1; font-size: 1.125rem; font-weight: var(--title-weight); color: var(--ink); -webkit-line-clamp: unset; }
.pwall[data-view="list"] .ptile__desc { display: block; grid-column: 2; grid-row: 2; font-size: 0.9375rem; color: var(--slate); }
.pwall[data-view="list"] .ptile__type { grid-column: 3; grid-row: 1 / span 2; font-size: 0.875rem; }
.pwall[data-view="list"] .ptile__go { position: static; grid-column: 4; grid-row: 1 / span 2; justify-self: end; opacity: 1; transform: none; }
.pwall[data-view="list"] .ptile__domain { display: inline; }
.pwall[data-view="list"] a.ptile:hover .ptile__domain { color: var(--red); }
@media (max-width: 900px) {
	.pwall[data-view="list"] .ptile { grid-template-columns: 112px minmax(0, 1fr) auto; }
	.pwall[data-view="list"] .ptile__logo img { width: min(calc(var(--w) * .5), 100px); max-height: 40px; }
	.pwall[data-view="list"] .ptile__type { grid-column: 2; grid-row: 2; }
	.pwall[data-view="list"] .ptile__desc { display: none; }
	.pwall[data-view="list"] .ptile__go { grid-column: 3; }
	.pwall[data-view="list"] .ptile__domain { display: none; }
}
@media (max-width: 700px) {
	.pwall .ptile { aspect-ratio: auto; min-height: 196px; }
	.pwall .ptile__logo { padding-block: 18px; }
	.pwall .ptile__logo img { width: min(calc(var(--w) * .8), 100%); }
	.pwall .ptile__type { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
}
.partners-cta .statement { max-width: 30ch; }
@media print { .partners-strip, .partners-bar { display: none !important; } }

/* =================================================================
   9d. Contact page and form
   ================================================================= */
.contact-hero { background: var(--mist); padding-block: clamp(40px, 6vw, 80px) clamp(56px, 7vw, 96px); }
.contact-hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
.contact-hero__info { grid-column: 1 / span 5; min-width: 0; }
.contact-hero__form { grid-column: 7 / -1; min-width: 0; scroll-margin-top: calc(var(--masthead-h) + var(--admin-bar) + 24px); }
.contact-hero .crumbs { margin-bottom: 24px; }
.contact-hero .entry-title { font-size: clamp(2.375rem, 5vw, 4rem); }
.contact-hero .entry-deck { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); max-width: 36ch; }
@media (max-width: 960px) {
	.contact-hero__grid { display: block; }
	.contact-hero__form { margin-top: 44px; }
}

.contact-list { margin: 40px 0 0; border-top: 1px solid color-mix(in srgb, var(--ink) 16%, #fff); }
.contact-list__row {
	display: grid; grid-template-columns: minmax(7.5rem, 32%) minmax(0, 1fr); gap: 4px 20px; align-items: baseline;
	padding-block: 16px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 16%, #fff);
}
.contact-list dt { font-size: 0.875rem; color: var(--quiet); }
.contact-list dd { margin: 0; line-height: 1.55; }
.contact-list__big { font-size: 1.1875rem; font-weight: var(--title-weight); color: var(--ink); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .25em; transition: color .15s, text-decoration-color .15s; }
.contact-list__big:hover { color: var(--red); text-decoration-color: currentColor; }
html[dir="rtl"] .contact-list__big { unicode-bidi: plaintext; }
/* Arabic pages: each address line keeps the direction of its own script (Latin postcodes stay in place). */
html[dir="rtl"] .contact-list dd, html[dir="rtl"] .contact-map__address, html[dir="rtl"] .footer__address span { unicode-bidi: plaintext; text-align: right; }
@media (max-width: 420px) { .contact-list__row { grid-template-columns: minmax(0, 1fr); } }

.contact-follow { margin-top: 32px; }
.contact-follow__title { margin: 0 0 12px; font-size: 0.875rem; color: var(--quiet); }
.social-btns { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.social-btn {
	display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px 8px 12px; border: 1px solid color-mix(in srgb, var(--ink) 18%, #fff);
	border-radius: 999px; background: var(--white); color: var(--ink); font-size: 0.875rem; transition: border-color .15s, color .15s;
}
[dir="rtl"] .social-btn { padding: 8px 12px 8px 16px; }
.social-btn:hover { border-color: var(--ink); color: var(--red); }

.contact-card {
	padding: clamp(24px, 3.4vw, 44px); background: var(--white); border-radius: 2px;
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent), 0 28px 60px -36px rgba(26, 37, 48, .35);
}
.contact-card__title { margin: 0 0 28px; font-size: clamp(1.375rem, 2.2vw, 1.75rem); line-height: 1.2; }

/* Fields */
.field { margin: 0 0 22px; min-width: 0; }
fieldset.field { padding: 0; border: 0; }
.field__label { display: block; margin-bottom: 8px; padding: 0; font-size: 0.9375rem; font-weight: 450; line-height: 1.35; color: var(--ink); }
.field__req { color: var(--red); }
.field__opt { font-size: 0.8125rem; font-weight: 400; color: var(--quiet); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
@media (max-width: 600px) { .field-row { grid-template-columns: minmax(0, 1fr); } }
.field__input {
	display: block; width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--ink) 24%, #fff); border-radius: 2px;
	background: var(--white); color: var(--ink); font: 400 1rem/1.5 var(--font); transition: border-color .15s, box-shadow .15s, background-color .15s;
	-webkit-appearance: none; appearance: none;
}
.field__input:hover { border-color: color-mix(in srgb, var(--ink) 45%, #fff); }
.field__input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 12%, transparent); }
.field__input--area { min-height: 168px; resize: vertical; }
.field__input[aria-invalid="true"] { border-color: var(--red); background: color-mix(in srgb, var(--red) 3%, #fff); }
.field__input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 16%, transparent); }
.field__error { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 0.875rem; line-height: 1.4; color: var(--red-deep); }
.field__error .cpi-icon { flex-shrink: 0; }

/* Enquiry type: two clear choices */
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .choice-grid { grid-template-columns: minmax(0, 1fr); } }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; inset-inline-start: 16px; top: 18px; width: 16px; height: 16px; margin: 0; opacity: 0; }
.choice__box {
	position: relative; display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px 15px 44px;
	border: 1px solid color-mix(in srgb, var(--ink) 24%, #fff); border-radius: 2px; background: var(--white);
	transition: border-color .15s, box-shadow .15s, background-color .15s;
}
[dir="rtl"] .choice__box { padding: 14px 44px 15px 16px; }
.choice__box::before {
	content: ""; position: absolute; inset-inline-start: 16px; top: 17px; width: 16px; height: 16px; border-radius: 50%;
	border: 1.5px solid color-mix(in srgb, var(--ink) 40%, #fff); background: var(--white); transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.choice__title { font-size: 0.9375rem; font-weight: 450; line-height: 1.35; }
.choice__desc { font-size: 0.8125rem; line-height: 1.45; color: var(--slate); }
.choice:hover .choice__box { border-color: color-mix(in srgb, var(--ink) 45%, #fff); }
.choice input:checked + .choice__box { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice input:checked + .choice__box::before { border-color: var(--red); background: var(--red); box-shadow: inset 0 0 0 3.5px var(--white); }
.choice input:focus-visible + .choice__box { outline: 2px solid var(--red); outline-offset: 2px; }
.has-error .choice__box { border-color: var(--red); }

.contact-form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 8px; }
.contact-form__note { margin: 0; max-width: 34ch; font-size: 0.8125rem; line-height: 1.5; color: var(--quiet); }
.contact-form__send { min-height: 52px; padding: 14px 24px; font-size: 1rem; }
.contact-form__send:disabled { opacity: .7; cursor: progress; }
.contact-form__send [hidden] { display: none; }
.contact-form__trap { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.contact-form__alert { margin: 0 0 22px; padding: 12px 16px; border-inline-start: 3px solid var(--red); background: color-mix(in srgb, var(--red) 7%, #fff); color: var(--red-deep); font-size: 0.9375rem; line-height: 1.5; }
.contact-form__alert[hidden], .contact-form__done[hidden], .contact-form__form[hidden] { display: none; }

.contact-form__done { padding: 8px 0 4px; outline: none; }
.contact-form__tick { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--red); color: var(--white); }
.contact-form__tick .cpi-icon { fill: none; }
.contact-form__done-title { margin: 22px 0 10px; font-size: clamp(1.375rem, 2.2vw, 1.75rem); line-height: 1.2; }
.contact-form__done-text { margin: 0 0 24px; color: var(--slate); max-width: 40ch; }
.contact-form__again { padding: 0; border: 0; background: none; font: inherit; font-size: 0.9375rem; cursor: pointer; }

/* Map: drawn placeholder until the visitor asks for Google Maps */
.contact-map { padding-block: clamp(56px, 7vw, 96px); }
.contact-map__bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 28px; margin-bottom: 20px; }
.contact-map__address { margin: 0; font-size: 1.125rem; }
.contact-map__links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; }
.map {
	position: relative; aspect-ratio: 16 / 7; min-height: 300px; overflow: hidden; border-radius: 2px;
	background-color: color-mix(in srgb, var(--ink) 5%, #fff);
	background-image:
		repeating-linear-gradient(118deg, transparent 0 150px, rgba(255, 255, 255, .95) 150px 162px),
		repeating-linear-gradient(28deg, transparent 0 220px, rgba(255, 255, 255, .95) 220px 238px),
		repeating-linear-gradient(80deg, transparent 0 96px, rgba(255, 255, 255, .7) 96px 101px),
		linear-gradient(color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px),
		linear-gradient(90deg, color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px);
	background-size: auto, auto, auto, 32px 32px, 32px 32px;
}
.map.is-loaded { background: var(--mist); }
.map__placeholder { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 16px; padding: 24px; text-align: center; }
.map__pin { color: var(--red); filter: drop-shadow(0 6px 10px rgba(26, 37, 48, .25)); }
.map__note { margin: 0; padding: 4px 10px; max-width: 44ch; border-radius: 2px; background: rgba(255, 255, 255, .85); font-size: 0.8125rem; line-height: 1.45; color: var(--slate); }
.map__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 760px) { .map { aspect-ratio: 4 / 3; } }
@media print { .contact-card, .map, .contact-follow { display: none !important; } }

/* =================================================================
   9e. Cookie consent – first-visit card, settings panel, cookie button,
       placeholders for external media, initials instead of Gravatar
   ================================================================= */
.consent {
	position: fixed; z-index: 95; bottom: calc(20px + env(safe-area-inset-bottom)); inset-inline-start: 20px;
	width: min(420px, calc(100vw - 40px)); padding: 22px 24px 24px;
	background: var(--white); color: var(--ink);
	border: 1px solid var(--line); border-top: 3px solid var(--red); border-radius: 2px;
	box-shadow: 0 22px 60px -18px rgba(26, 37, 48, .35), 0 2px 6px rgba(26, 37, 48, .06);
	opacity: 0; transform: translateY(16px);
	transition: opacity .35s var(--ease), transform .5s var(--ease);
}
.consent.is-in { opacity: 1; transform: none; }
.consent[hidden] { display: none; }
.consent__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.consent__mark {
	display: inline-grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px;
	border-radius: 50%; background: var(--ink); color: var(--white);
}
.consent__title { margin: 0; font-size: 1.125rem; font-weight: var(--title-weight); line-height: 1.25; letter-spacing: -0.01em; }
.consent__text { margin: 0 0 18px; font-size: 0.9375rem; line-height: 1.55; color: var(--slate); }
.consent__text a, .consent-panel__intro a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.consent__text a:hover, .consent-panel__intro a:hover { color: var(--red); }
.consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.consent__actions .btn { width: 100%; }
.consent__choose { grid-column: 1 / -1; }

/* Settings panel */
.consent-panel {
	width: min(620px, calc(100vw - 32px)); max-width: none; max-height: min(88vh, 780px); padding: 0;
	border: 0; border-radius: 2px; background: var(--white); color: var(--ink);
	box-shadow: 0 30px 90px -20px rgba(26, 37, 48, .5);
}
.consent-panel[open] { display: flex; }
.consent-panel::backdrop { background: rgba(26, 37, 48, .55); }
.consent-panel__inner { display: flex; flex-direction: column; width: 100%; max-height: inherit; margin: 0; }
.consent-panel__head {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 20px 28px 16px; border-top: 3px solid var(--red); border-bottom: 1px solid var(--line);
}
.consent-panel__title { margin: 0; font-size: 1.375rem; font-weight: var(--title-weight); letter-spacing: -0.01em; }
.consent-panel__close {
	display: inline-grid; place-items: center; width: 40px; height: 40px; margin-inline-end: -10px;
	border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer;
}
.consent-panel__close:hover { background: var(--mist); }
.consent-panel__body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 4px 28px 8px; }
.consent-panel__intro { margin: 16px 0 4px; font-size: 0.9375rem; line-height: 1.55; color: var(--slate); }
.consent-panel__gpc { margin: 12px 0 4px; padding: 10px 14px; border-inline-start: 3px solid var(--ink); background: var(--mist); font-size: 0.875rem; line-height: 1.5; }
.consent-panel__gpc[hidden] { display: none; }
.consent-cat { padding: 18px 0; border-bottom: 1px solid var(--line); }
.consent-cat:last-child { border-bottom: 0; }
.consent-cat__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.consent-cat__name { margin: 0; font-size: 1rem; font-weight: var(--title-weight); }
.consent-cat__name label { cursor: pointer; }
.consent-cat__always { font-size: 0.8125rem; color: var(--quiet); white-space: nowrap; }
.consent-cat__desc { max-width: 46em; margin: 6px 0 0; font-size: 0.875rem; line-height: 1.55; color: var(--slate); }
.consent-cat__more { margin-top: 10px; font-size: 0.8125rem; }
.consent-cat__more summary { display: inline-flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; color: var(--ink); }
.consent-cat__more summary::-webkit-details-marker { display: none; }
.consent-cat__more summary::after { content: "+"; font-size: 1rem; line-height: 1; color: var(--quiet); }
.consent-cat__more[open] summary::after { content: "−"; }
.consent-cat__more summary:hover { color: var(--red); }
.consent-panel__foot {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
	padding: 16px 28px 20px; border-top: 1px solid var(--line);
}
.consent-panel__pair { display: flex; gap: 8px; }

/* Cookie lists (panel and the [cpi_cookie_table] shortcode) */
.consent-table__scroll, .cookie-table__scroll { overflow-x: auto; margin-top: 8px; }
.consent-table, .cookie-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; line-height: 1.45; }
.consent-table th, .consent-table td, .cookie-table th, .cookie-table td { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
[dir="rtl"] .consent-table th, [dir="rtl"] .consent-table td, [dir="rtl"] .cookie-table th, [dir="rtl"] .cookie-table td { padding: 8px 0 8px 12px; }
.consent-table th, .cookie-table th { font-weight: var(--title-weight); font-size: 0.75rem; color: var(--quiet); }
.consent-table code, .cookie-table code { font: 0.75rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: none; padding: 0; overflow-wrap: anywhere; }
.cookie-table { font-size: 0.875rem; margin-bottom: 1.5em; }
.cookie-policy h3 { margin-top: 1.6em; }

/* On/off switch */
.switch {
	-webkit-appearance: none; appearance: none; position: relative; flex-shrink: 0; width: 46px; height: 26px; margin: 0;
	border-radius: 13px; background: color-mix(in srgb, var(--ink) 22%, #fff); cursor: pointer; transition: background-color .2s;
}
.switch::before {
	content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%;
	background: var(--white); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--ease);
}
.switch:checked { background: var(--ink); }
.switch:checked::before { transform: translateX(20px); }
[dir="rtl"] .switch:checked::before { transform: translateX(-20px); }
.switch:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* Cookie button (to change one's mind at any time) */
.consent-fab {
	position: fixed; z-index: 90; bottom: calc(20px + env(safe-area-inset-bottom)); inset-inline-start: 20px;
	display: inline-flex; align-items: center; gap: 0; height: 52px; min-width: 52px; padding: 0 13px;
	border: 0; border-radius: 26px; background: var(--ink); color: var(--white); cursor: pointer; overflow: hidden;
	font: 400 0.875rem/1 var(--font);
	box-shadow: 0 10px 28px -10px rgba(26, 37, 48, .6);
	transition: background-color .2s, gap .3s var(--ease);
}
.consent-fab[hidden] { display: none; }
.consent-fab .cookie-icon { flex-shrink: 0; transition: transform .5s var(--ease); }
.consent-fab__label { max-width: 0; opacity: 0; white-space: nowrap; transition: max-width .35s var(--ease), opacity .2s; }
.consent-fab:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.consent-fab:focus-visible, .consent-fab:active { background: var(--red); }
@media (hover: hover) and (pointer: fine) {
	.consent-fab:hover { background: var(--red); gap: 10px; }
	.consent-fab:hover .cookie-icon { transform: rotate(-24deg); }
	.consent-fab:hover .consent-fab__label { max-width: 220px; opacity: 1; padding-inline-end: 4px; }
}
.consent-fab:focus-visible { gap: 10px; }
.consent-fab:focus-visible .consent-fab__label { max-width: 220px; opacity: 1; padding-inline-end: 4px; }

.footer__cookies { padding: 0; border: 0; background: none; font: inherit; color: var(--slate); cursor: pointer; }
.footer__cookies:hover { color: var(--red); }

/* External media waiting for consent */
.consent-embed {
	position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; min-height: 240px; margin: 0 0 1.5em;
	border: 1px solid var(--line); background: var(--mist); text-align: center;
}
.wp-has-aspect-ratio .wp-block-embed__wrapper > .consent-embed { position: absolute; inset: 0; min-height: 0; aspect-ratio: auto; margin: 0; }
.wp-block-embed .consent-embed { margin: 0; }
.consent-embed__box { max-width: 460px; padding: 24px; }
.consent-embed__title { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 1rem; font-weight: var(--title-weight); }
.consent-embed__text { margin: 0 0 16px; font-size: 0.875rem; line-height: 1.5; color: var(--slate); }
.consent-embed__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; margin: 0; }
.consent-embed__always {
	padding: 4px 0; border: 0; background: none; font: inherit; font-size: 0.8125rem; color: var(--ink);
	text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.consent-embed__always:hover { color: var(--red); }
.map__placeholder .consent-embed__always { background: rgba(255, 255, 255, .85); padding: 4px 10px; border-radius: 2px; }

/* Initials instead of Gravatar */
.avatar--initials {
	display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 50%;
	border: 1px solid var(--line); background: var(--mist); color: var(--ink);
	font-weight: var(--title-weight); line-height: 1; letter-spacing: 0.02em; vertical-align: middle;
}

@media (max-width: 560px) {
	.consent { inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; padding: 18px 18px 20px; }
	.consent__text { font-size: 0.875rem; margin-bottom: 14px; }
	.consent-fab { inset-inline-start: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); height: 46px; min-width: 46px; padding: 0 10px; }
	.consent-panel { width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
	.consent-panel__head, .consent-panel__body, .consent-panel__foot { padding-inline: 20px; }
	.consent-panel__foot { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
	.consent-panel__foot > .btn, .consent-panel__pair { width: 100%; }
	.consent-panel__pair .btn { flex: 1; }
}
@media print { .consent, .consent-fab, .consent-panel, .consent-embed__box { display: none !important; } }

/* =================================================================
   9f. The Cordoba Update – newsletter issues (single-newsletter.php)
   ================================================================= */
.nl-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 28px 18px; }
.nl-bar .breadcrumbs { margin: 0; }
.nl-bar__end { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.nl-langs { display: flex; gap: 18px; margin: 0; font-size: 0.9375rem; }
.nl-langs a { color: var(--red); text-decoration: underline; text-underline-offset: .25em; }
.nl-langs a:hover { color: var(--ink); }
.nl-print { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; font: inherit; font-size: 0.875rem; color: var(--slate); cursor: pointer; }
.nl-print:hover { color: var(--red); }

.nl-mast { margin-bottom: clamp(28px, 4vw, 48px); }
/* A lockup like the Institute's logo: the arch, centred vertically, a fine vertical rule, then the title –
   The Cordoba Update as one of the Institute's own products. */
.nl-mast__inner {
	display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(24px, 3.2vw, 44px); align-items: center;
	padding-block: clamp(28px, 4vw, 48px); padding-inline: 0 clamp(20px, 3.5vw, 44px); /* the arch sits on the edge, right above the column below */
	background: var(--nl-ivory); border-top: 4px solid var(--red);
	position: relative; isolation: isolate; overflow: hidden;
	--nl-ivory: #f4f0e7;
	/* Gold, kept dark enough to read over the pattern: the title stays above 3:1 (large text) and the date above 5:1
	   wherever the faded pattern sits behind them. */
	--nl-gold-deep: #6e5115; --nl-gold: #86641f; --nl-gold-light: #9d7a2c;
}
/* The Cordoba Update pattern, traced from the original newsletter banner; it fades away
   from the arch towards the date. */
.nl-mast__inner::before {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background: url("assets/brand/pattern.svg") 0 0 / 228px auto repeat;
	-webkit-mask-image: linear-gradient(to bottom right, #000 0%, rgba(0, 0, 0, .8) 30%, rgba(0, 0, 0, .3) 100%);
	mask-image: linear-gradient(to bottom right, #000 0%, rgba(0, 0, 0, .8) 30%, rgba(0, 0, 0, .3) 100%);
}
[dir="rtl"] .nl-mast__inner::before {
	background-position: 100% 0;
	-webkit-mask-image: linear-gradient(to bottom left, #000 0%, rgba(0, 0, 0, .8) 30%, rgba(0, 0, 0, .3) 100%);
	mask-image: linear-gradient(to bottom left, #000 0%, rgba(0, 0, 0, .8) 30%, rgba(0, 0, 0, .3) 100%);
}
.nl-mast__arch { display: block; width: 100%; height: auto; }
.nl-mast__text {
	display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: clamp(6px, 1vw, 12px);
	align-self: stretch; padding-block: 4px; padding-inline-start: clamp(24px, 3.2vw, 44px);
	border-inline-start: 1.5px solid color-mix(in srgb, var(--ink) 40%, transparent); /* the rule, as in the logo */
}
.nl-mast__title { margin: 0; font-size: clamp(2.25rem, 5vw, 4rem); font-weight: var(--title-weight); line-height: 1.02; letter-spacing: var(--tracking-display); color: var(--nl-gold); }
.nl-mast__issue { margin: 0; font-size: clamp(1.0625rem, 1.8vw, 1.5rem); font-weight: var(--title-weight); line-height: 1.2; color: var(--nl-gold-deep); }
/* Burnished gold: a metallic band across the letters with a fine light edge below, as if engraved. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
	.nl-mast__title, .nl-mast__issue {
		background: linear-gradient(180deg, var(--nl-gold-deep) 0%, var(--nl-gold-light) 42%, var(--nl-gold) 58%, var(--nl-gold-deep) 100%);
		-webkit-background-clip: text; background-clip: text;
		-webkit-text-fill-color: transparent; color: transparent;
		filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .85));
		/* The gold is painted inside the box, so the box reaches below the deepest descenders
		   (Arabic ق ر ة go far down); the negative margin keeps the layout as it was. */
		padding-block: .12em .34em; margin-block: -.12em -.34em;
	}
	:lang(ar) :is(.nl-mast__title, .nl-mast__issue), .nl-mast__title:lang(ar) { padding-block: .2em .5em; margin-block: -.2em -.5em; }
	.nl-mast__issue { background-image: linear-gradient(180deg, var(--nl-gold-deep) 0%, #7a5a18 50%, var(--nl-gold-deep) 100%); }
	/* Selected, the letters turn white on deep gold instead of vanishing. */
	:is(.nl-mast__title, .nl-mast__issue)::selection,
	:is(.nl-mast__title, .nl-mast__issue) ::selection { -webkit-text-fill-color: #fff; color: #fff; background: var(--nl-gold-deep); }
}
@media (forced-colors: active) {
	.nl-mast__title, .nl-mast__issue { -webkit-text-fill-color: CanvasText; background: none; filter: none; }
	.nl-mast__inner::before { display: none; }
}
@media (max-width: 860px) {
	/* One column below: the arch keeps a modest size beside the title. */
	.nl-mast__inner { grid-template-columns: clamp(110px, 30vw, 180px) minmax(0, 1fr); gap: 16px; padding: 22px 18px; }
	.nl-mast__inner::before { background-size: 150px auto; }
	.nl-mast__text { padding-inline-start: 16px; gap: 6px; border-inline-start-width: 1px; }
}

.nl-grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; padding-bottom: clamp(40px, 6vw, 72px); }
.nl-grid--solo { grid-template-columns: minmax(0, 1fr); }
.nl-grid--solo .nl-main { max-width: 760px; }
.nl-side { display: flex; flex-direction: column; gap: 20px; align-self: stretch; }
.nl-toc { position: sticky; top: calc(var(--admin-bar) + var(--masthead-h) + 24px); max-height: calc(100vh - var(--admin-bar) - var(--masthead-h) - 48px); overflow-y: auto; padding: 20px 22px; background: var(--mist); border-top: 3px solid var(--red); }
.nl-toc--red { background: var(--red); border-top: 0; color: var(--white); padding: 26px; }
.nl-toc__title { margin: 0 0 12px; font-size: 0.875rem; font-weight: var(--title-weight); color: var(--red); }
.nl-toc--red .nl-toc__title { color: var(--white); font-size: 1rem; }
.nl-toc__list { margin: 0; padding: 0; list-style: none; counter-reset: none; }
.nl-toc__list li + li { margin-top: 8px; }
.nl-toc__list a { display: block; font-size: 0.9375rem; line-height: 1.35; color: var(--ink); text-decoration: none; }
.nl-toc__list a:hover { color: var(--red); }
/* Titles, sections under them, and the subtitles of each section further in. */
.nl-toc__list .nl-toc__d1 > a { font-weight: var(--title-weight); }
.nl-toc__list .nl-toc__d1:not(:first-child) { margin-top: 14px; }
.nl-toc__list .nl-toc__d2 { padding-inline-start: 14px; }
.nl-toc__list .nl-toc__d3 { margin-inline-start: 14px; padding-inline-start: 12px; border-inline-start: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
.nl-toc__list .nl-toc__d2 > a { font-size: 0.875rem; }
.nl-toc__list .nl-toc__d3 > a { font-size: 0.8125rem; opacity: .82; }
.nl-toc__list .nl-toc__d1 + li, .nl-toc__list .nl-toc__d3 { margin-top: 6px; }
.nl-toc__list .nl-toc__d3 + .nl-toc__d2 { margin-top: 10px; }
.nl-toc--red .nl-toc__list a { color: var(--white); }
.nl-toc--red .nl-toc__list a:hover { text-decoration: underline; text-underline-offset: .2em; color: var(--white); }
.nl-editorial {
	padding: 28px 26px 26px; background: var(--red); color: var(--white);
	font-size: 0.9375rem; line-height: 1.6;
}
.nl-editorial p { margin: 0 0 1em; }
.nl-editorial a { color: var(--white); text-decoration: underline; text-underline-offset: .2em; }
.nl-editorial strong { font-weight: var(--title-weight); }
.nl-editorial__sign { margin: 1.4em 0 0 !important; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .45); font-weight: var(--title-weight); }
.nl-main { min-width: 0; max-width: 760px; }
.nl-hero { margin: 0 0 32px; }
.nl-hero img { display: block; width: 100%; height: auto; }
.nl-hero figcaption, .nl-content figcaption { margin-top: 8px; font-size: 0.8125rem; line-height: 1.45; color: var(--quiet); }
/* Older issues pasted from emails carry fixed widths (tables of 600–900 px, sized blocks):
   make them fluid, so nothing pushes the page sideways – in Arabic, it would overflow left. */
.nl-issue { overflow-x: clip; }
.nl-main, .nl-side { min-width: 0; }
.nl-content, .nl-editorial { overflow-wrap: anywhere; }
:where(.nl-content, .nl-editorial) :where(*) { max-width: 100%; box-sizing: border-box; }
:where(.nl-content, .nl-editorial) [style*="width"] { width: auto !important; }
:where(.nl-content, .nl-editorial) :is(img, video) { height: auto; }
:where(.nl-content, .nl-editorial) img[width] { width: auto; }
.nl-content iframe { width: 100%; }
:where(.nl-content, .nl-editorial) :is(table, tbody, thead, tfoot, tr, td, th) { display: block; width: auto !important; min-width: 0; }
.nl-content > h2:first-child { margin-top: 0; }
.nl-content h2 { color: var(--red); font-size: clamp(1.5rem, 2.4vw, 1.875rem); }
.nl-content h3 { margin-top: 1.8em; }
/* Articles of older issues, rebuilt as cards: picture on the start side, text and button beside it. */
.nl-issue [hidden] { display: none !important; }
.nl-content hr:has(+ .nl-feature), .nl-content .nl-feature + hr { display: none; }
.nl-content .nl-feature {
	display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: clamp(20px, 3vw, 32px); align-items: center;
	margin: 0; padding-block: clamp(24px, 3.5vw, 36px); border-top: 1px solid var(--line);
}
.nl-content .nl-feature + :not(.nl-feature) { margin-top: clamp(8px, 2vw, 16px); }
.nl-content .nl-feature:has(+ :not(.nl-feature)), .nl-content .nl-feature:last-child { border-bottom: 1px solid var(--line); }
.nl-content .nl-feature + .nl-feature { margin-top: 0; }
.nl-feature__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--mist); }
.nl-content .nl-feature__media img { display: block; width: 100%; height: 100%; margin: 0; object-fit: cover; transition: transform .5s var(--ease); }
.nl-feature:hover .nl-feature__media img { transform: scale(1.03); }
.nl-feature__body { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.nl-content .nl-feature__title { margin: 0 0 8px; font-size: clamp(1.1875rem, 1.9vw, 1.4375rem); font-weight: var(--title-weight); line-height: 1.28; color: var(--ink); }
.nl-content .nl-feature__title a { color: var(--ink); text-decoration: none; }
.nl-content .nl-feature__title a:hover { color: var(--red); }
.nl-content .nl-feature__by { margin: 0 0 6px; font-size: 0.9375rem; line-height: 1.45; color: var(--slate); }
.nl-content .nl-feature__text { margin: 0 0 6px; font-size: 0.9375rem; line-height: 1.55; }
.nl-content .nl-feature__btn { margin-top: 12px; min-height: 40px; padding: 8px 18px; font-size: 0.875rem; }
/* A picture that can't be loaded: the arch, quietly, keeps the card's shape. */
.nl-content .nl-feature__media.is-placeholder { display: grid; place-items: center; background: var(--mist); }
.nl-content .nl-feature__media.is-placeholder img { width: 46%; height: auto; opacity: .35; object-fit: contain; transform: none; }
.nl-feature--noimg { grid-template-columns: minmax(0, 1fr); }
.nl-feature--noimg .nl-feature__media { display: none; }
@media (max-width: 540px) {
	/* Phones: the picture above, full width; text and button below. */
	.nl-content .nl-feature { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.nl-feature__media { aspect-ratio: 16 / 9; }
}

.nl-more { padding-block: clamp(36px, 5vw, 56px); background: var(--mist); }
.nl-more__title { display: block; margin: 0 0 22px; font-size: 0.9375rem; }
.nl-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.nl-card { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); background: var(--white); border: 1px solid var(--line); }
.nl-card__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--line); }
.nl-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.nl-card:hover .nl-card__media img { transform: scale(1.03); }
.nl-card__body { display: flex; flex-direction: column; align-items: flex-start; padding: 20px 22px 22px; }
.nl-card__title { margin: 0 0 6px; font-size: 1.1875rem; font-weight: var(--title-weight); line-height: 1.3; }
.nl-card__title a { color: var(--ink); text-decoration: none; }
.nl-card__title a:hover { color: var(--red); }
.nl-card__by { margin: 0 0 16px; font-size: 0.875rem; color: var(--slate); }
.nl-card__btn { margin-top: auto; min-height: 40px; padding: 8px 18px; font-size: 0.875rem; }
.nl-card:not(:has(.nl-card__media)) { grid-template-columns: 1fr; }

.nl-after { padding-block: 28px; }
.nl-after__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; }

@media (max-width: 1099px) {
	.nl-cards { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
	.nl-grid { grid-template-columns: minmax(0, 1fr); }
	.nl-toc { position: static; }
}
@media (max-width: 560px) {
	.nl-card { grid-template-columns: minmax(0, 1fr); }
	.nl-card__media { aspect-ratio: 16 / 9; }
}
@media print {
	.nl-bar, .nl-after, .nl-issue .band, .consent-fab, .nl-card__btn { display: none !important; }
	.nl-mast__inner { border-top-width: 3px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.nl-editorial, .nl-toc--red { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.nl-toc { display: none; }
	.nl-grid { grid-template-columns: 34% 1fr; gap: 24px; }
	.nl-more { background: none; padding: 0; }
	.nl-card { break-inside: avoid; }
}

/* =================================================================
   10. Motion, print
   ================================================================= */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
	.site-header, .site-footer, .entry-aside, .share, .related, .band, .post-nav, .toc-mobile, .comments-wrap { display: none !important; }
	.entry-layout { display: block; }
	body { font-size: 11pt; }
	.entry-content a { color: inherit; }
}

/* =================================================================
   9g. Home: at a glance – map, figures, voices, resources
   ================================================================= */
.glance { --tone-1: #7d1216; --tone-2: var(--red); --tone-3: #a8191f; --tone-4: #e8686c; --tone-5: #c2353a; --tone-6: #f2a3a5; }
.glance__grid { display: grid; grid-template-columns: repeat(var(--cards, 4), minmax(0, 1fr)); gap: 16px; }
.glance-card {
	position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
	padding: clamp(22px, 2.4vw, 32px); background: var(--mist);
}
.glance-card__title { margin: 0 0 20px; font-size: 0.9375rem; font-weight: var(--title-weight); line-height: 1.3; letter-spacing: .02em; text-transform: uppercase; color: var(--red); }
:lang(ar) .glance-card__title { letter-spacing: 0; font-size: 1.0625rem; }
.glance-card__text { margin: 18px 0 0; font-size: 0.9375rem; line-height: 1.6; color: var(--ink); }
.glance-card__more {
	display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; margin-top: auto; padding: 24px 0 0;
	border: 0; background: none; font: 600 0.875rem/1.2 var(--font); letter-spacing: .02em; text-transform: uppercase; color: var(--red); text-decoration: none; cursor: pointer;
}
.glance-card__more .cpi-icon { transition: transform .2s var(--ease); }
.glance-card__more:hover .cpi-icon { transform: translateX(4px); }
[dir="rtl"] .glance-card__more:hover .cpi-icon { transform: scaleX(-1) translateX(4px); }
.glance-card__more:hover { color: var(--red-deep); }

/* Map */
.glance-map { position: relative; }
.cpi-map { display: block; width: 100%; height: auto; overflow: visible; }
.glance-card .cpi-map { max-height: 270px; margin-inline: auto; }
.cpi-map__land path { fill: #e3e2de; stroke: #fff; stroke-width: .7; vector-effect: non-scaling-stroke; }
.cpi-map__c path, .cpi-map__dot { stroke: #fff; stroke-width: .9; vector-effect: non-scaling-stroke; transition: fill .15s, opacity .2s; }
.cpi-map__dot { stroke-width: 1.6; }
.cpi-map__c { cursor: pointer; outline: none; }
.cpi-map__c.tone-1 :is(path, circle) { fill: var(--tone-1); }
.cpi-map__c.tone-2 :is(path, circle) { fill: var(--tone-2); }
.cpi-map__c.tone-3 :is(path, circle) { fill: var(--tone-3); }
.cpi-map__c.tone-4 :is(path, circle) { fill: var(--tone-4); }
.cpi-map__c.tone-5 :is(path, circle) { fill: var(--tone-5); }
.cpi-map__c.tone-6 :is(path, circle) { fill: var(--tone-6); }
.cpi-map__c:is(:hover, :focus-visible, .is-on) :is(path, circle) { fill: var(--ink); }
.cpi-map__c:focus-visible path { stroke: var(--white); stroke-width: 2; }
.cpi-map__c.is-dim { opacity: .18; }
.cpi-map__disputed { fill: #eceae6; stroke: #a9a6a0; stroke-width: .8; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; }
.glance-map__tip {
	position: absolute; z-index: 2; left: 0; top: 0; transform: translate(-50%, calc(-100% - 10px)); pointer-events: none;
	padding: 6px 10px; background: var(--ink); color: var(--white); font-size: 0.8125rem; line-height: 1.35; white-space: nowrap; border-radius: 2px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.glance-map__tip strong { font-weight: var(--title-weight); }
.glance-map__tip span { display: block; opacity: .75; font-size: 0.75rem; }

/* Figures */
.figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 12px; margin: 4px 0 0; padding: 0; list-style: none; }
.figure { display: grid; justify-items: center; align-content: start; gap: 6px; text-align: center; }
.figure .cpi-icon { color: var(--red); margin-bottom: 4px; }
.figure__num { display: inline-flex; align-items: baseline; gap: 5px; line-height: 1; color: var(--ink); white-space: nowrap; }
.figure__value { font-size: clamp(1.5rem, 2.1vw, 1.875rem); font-weight: var(--title-weight); letter-spacing: -0.01em; unicode-bidi: isolate; }
.figure__unit { font-size: 1rem; font-weight: var(--title-weight); }
.figure__label { font-size: 0.8125rem; line-height: 1.35; color: var(--slate); }
.figures__note { margin: 18px 0 0; font-size: 0.75rem; color: var(--quiet); text-align: center; }

/* Voices */
.glance-card--voices { padding-inline-end: 0; padding-bottom: 0; }
.voices__preview { margin: -10px 0 12px; padding-inline-end: 22px; font-size: 0.75rem; line-height: 1.4; color: var(--red-deep); }
.voices__track {
	display: flex; flex: 1; margin: 0; padding: 0; list-style: none;
	overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; touch-action: pan-x pan-y; outline: none;
}
.voices__track::-webkit-scrollbar { display: none; }
.voice { flex: 0 0 100%; display: grid; grid-template-columns: minmax(0, 1fr) 46%; column-gap: 10px; scroll-snap-align: start; min-height: 290px; }
.voice__fig { margin: 0; padding-bottom: 76px; min-width: 0; }
.voice__quote { margin: 0; padding: 0; border: 0; }
.voice__quote .cpi-icon { color: var(--red); margin-bottom: 14px; }
[dir="rtl"] .voice__quote .cpi-icon { transform: scaleX(-1); }
.voice__quote p { margin: 0; font-size: 0.9375rem; line-height: 1.6; color: var(--ink); }
.voice__who { margin-top: 16px; font-size: 0.8125rem; line-height: 1.4; color: var(--slate); }
.voice__media { position: relative; align-self: stretch; display: flex; align-items: flex-end; justify-content: center; min-height: 100%; overflow: hidden; }
.voice__media img { display: block; width: 100%; }
/* No photo: the portrait stands on the card's base, large, facing the words (mirrored in Arabic). */
.voice__media--art { align-items: flex-end; justify-content: flex-end; }
.voice__media--art img { width: 100%; height: auto; max-height: 340px; object-fit: contain; object-position: bottom right; }
[dir="rtl"] .voice__media--art { justify-content: flex-start; }
[dir="rtl"] .voice__media--art img { transform: scaleX(-1); object-position: bottom left; }
.voices__badge { display: inline-block; padding: 2px 8px; border: 1px solid currentColor; border-radius: 2px; font-size: 0.6875rem; font-weight: var(--title-weight); letter-spacing: .06em; text-transform: uppercase; }
/* Photos in the Institute's red, whatever their colours (duotone). */
.voice__media--photo { background: var(--red); }
.voice__media--photo img { position: absolute; inset: 0; height: 100%; object-fit: cover; object-position: center top; filter: grayscale(1) contrast(1.08) brightness(1.08); mix-blend-mode: multiply; }
.voices__nav { position: absolute; inset-inline-start: clamp(22px, 2.4vw, 32px); bottom: clamp(20px, 2.2vw, 28px); display: flex; align-items: center; gap: 12px; }
.voices__btn { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; background: none; color: var(--red); cursor: pointer; }
.voices__btn:hover { color: var(--red-deep); }
.voices__btn:disabled { opacity: .3; cursor: default; }
.voices__dots { display: flex; gap: 8px; }
.voices__dots span { width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 18%, transparent); transition: background-color .2s; }
.voices__dots span.is-on { background: var(--red); }

/* Resources */
.resources { margin: 0; padding: 0; list-style: none; }
.resource { display: grid; grid-template-columns: 28px minmax(0, 1fr) 18px; align-items: center; gap: 16px; padding: 12px 0; color: var(--ink); text-decoration: none; }
.resource .cpi-icon { color: var(--red); }
.resource span { font-size: 0.9375rem; line-height: 1.35; }
.resource:hover span { color: var(--red); }
.resource .cpi-icon--arrow-right { transition: transform .2s var(--ease); }
.resource:hover .cpi-icon--arrow-right { transform: translateX(3px); }
[dir="rtl"] .resource:hover .cpi-icon--arrow-right { transform: scaleX(-1) translateX(3px); }

/* The regions, large (dialog) */
.regions { width: min(1180px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 0; background: var(--white); color: var(--ink); box-shadow: 0 24px 80px rgba(0, 0, 0, .25); }
.regions::backdrop { background: rgba(26, 37, 48, .55); }
.regions[open] { display: block; animation: regions-in .25s var(--ease); }
@keyframes regions-in { from { opacity: 0; transform: translateY(12px); } }
.regions__inner { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
.regions__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px clamp(18px, 3vw, 32px); border-top: 4px solid var(--red); }
.regions__title { margin: 0; font-size: clamp(1.25rem, 2vw, 1.625rem); font-weight: var(--title-weight); }
.regions__close { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; }
.regions__close:hover { color: var(--red); }
.regions__filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 clamp(18px, 3vw, 32px) 16px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font: 400 0.875rem/1.2 var(--font); color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--white); }
.chip__dot { width: 10px; height: 10px; border-radius: 50%; }
.chip__dot.tone-1 { background: var(--tone-1); } .chip__dot.tone-2 { background: var(--tone-2); } .chip__dot.tone-3 { background: var(--tone-3); }
.chip__dot.tone-4 { background: var(--tone-4); } .chip__dot.tone-5 { background: var(--tone-5); } .chip__dot.tone-6 { background: var(--tone-6); }
.regions__body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 36px); min-height: 0; overflow: auto; padding: 0 clamp(18px, 3vw, 32px) 26px; }
.regions__map { align-self: start; position: sticky; top: 0; background: var(--mist); padding: 12px; }
.regions__map .cpi-map { max-height: calc(100dvh - 220px); }
.regions__list { columns: 2; column-gap: 24px; }
.region { break-inside: avoid; margin-bottom: 20px; }
.region__name { margin: 0 0 6px; font-size: 0.8125rem; font-weight: var(--title-weight); letter-spacing: .02em; text-transform: uppercase; color: var(--red); }
.region__name a { color: inherit; text-decoration: none; }
.region__name a:hover { text-decoration: underline; text-underline-offset: .2em; }
.region ul { margin: 0; padding: 0; list-style: none; }
.region li a { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; color: var(--ink); text-decoration: none; }
.region li a:hover, .region li a.is-on { color: var(--red); }
.region__count { font-size: 0.75rem; color: var(--quiet); font-variant-numeric: tabular-nums; }
.region.is-dim { opacity: .35; }
.regions__note { column-span: all; margin: 4px 0 0; font-size: 0.75rem; color: var(--quiet); }
html:has(.regions[open]) { overflow: hidden; }

@media (max-width: 1199px) {
	.glance__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
	.regions__body { grid-template-columns: minmax(0, 1fr); }
	.regions__map { position: static; }
	.regions__list { columns: 2; }
}
@media (max-width: 640px) {
	.glance__grid { grid-template-columns: minmax(0, 1fr); }
	.glance-card .cpi-map { max-height: 320px; }
	.regions { width: 100vw; max-height: 100dvh; margin: 0; }
	.regions__inner { max-height: 100dvh; }
	.regions__list { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.regions[open] { animation: none; }
	.voices__track { scroll-behavior: auto; }
}
@media print { .glance, .regions { display: none !important; } }
/* Country pages (/country/ng/): region and programme links under the title. */
.archive-head__links a { color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.archive-head__links a:hover { color: var(--red-deep); }

/* =================================================================
   9h. Home: what we do – three areas of work, the latest news
   ================================================================= */
.wwd { --wwd-gold: #86641f; --wwd-bg: var(--mist); background: var(--wwd-bg); }
.hero-split + .wwd { border-top: 0; }
.wwd__head { margin-bottom: clamp(36px, 5vw, 64px); }
.wwd__heading { max-width: 26ch; margin: 14px 0 0; font-size: clamp(1.75rem, 3.2vw, 2.75rem); font-weight: var(--title-weight); line-height: 1.12; letter-spacing: var(--tracking-display); color: var(--ink); }
.wwd__grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: clamp(32px, 4vw, 56px); align-items: start; }
.wwd__grid--solo { grid-template-columns: minmax(0, 1fr); }
.wwd__areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3.5vw, 48px); margin: 0; padding: 0; list-style: none; }
.wwd__area { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.wwd__icon { width: 52px; height: 52px; color: var(--wwd-gold); }
.wwd__title { margin: 26px 0 10px; font-size: clamp(1.1875rem, 1.6vw, 1.375rem); font-weight: var(--title-weight); line-height: 1.25; color: var(--ink); }
.wwd__text { margin: 0 0 22px; font-size: 1rem; line-height: 1.55; color: var(--slate); }
.wwd__more { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; font-size: 0.9375rem; color: var(--ink); text-decoration: none; }
.wwd__more .cpi-icon { color: var(--wwd-gold); transition: transform .2s var(--ease); }
.wwd__more:hover { color: var(--red); }
.wwd__more:hover .cpi-icon { transform: translateX(4px); }
[dir="rtl"] .wwd__more:hover .cpi-icon { transform: scaleX(-1) translateX(4px); }
.wwd__news { min-width: 0; padding-inline-start: clamp(24px, 3vw, 40px); border-inline-start: 1px solid var(--line); }
.wwd__news-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.wwd__news-title { margin: 0; font-size: 0.8125rem; font-weight: var(--title-weight); letter-spacing: .02em; white-space: nowrap; text-transform: uppercase; color: var(--red); }
:lang(ar) .wwd__news-title { letter-spacing: 0; font-size: 1rem; }
.wwd__all { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8125rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.wwd__all:hover { color: var(--red); }
.wwd__items { margin: 0; padding: 0; list-style: none; }
.wwd__items li + li { margin-top: 18px; }
.wwd__item { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: start; color: var(--ink); text-decoration: none; }
.wwd__thumb { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink); }
.wwd__thumb:empty::before { content: ""; position: absolute; inset: 0; background: url("assets/brand/pattern.svg") 50% 50% / 110px auto repeat; opacity: .14; }
.wwd__thumb:has(img) { background: color-mix(in srgb, var(--ink) 8%, #fff); }
.wwd__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.wwd__item:hover .wwd__thumb img { transform: scale(1.04); }
.wwd__item-body { display: grid; gap: 3px; min-width: 0; }
.wwd__cat { font-size: 0.75rem; color: var(--red); }
.wwd__item-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 0.9375rem; font-weight: var(--title-weight); line-height: 1.32; }
.wwd__item:hover .wwd__item-title { color: var(--red); }
.wwd__date { font-size: 0.75rem; color: var(--quiet); }
@media (max-width: 1100px) {
	.wwd__grid { grid-template-columns: minmax(0, 1fr); }
	.wwd__news { padding: 32px 0 0; border-inline-start: 0; border-top: 1px solid var(--line); }
	.wwd__items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
	.wwd__items li + li { margin-top: 0; }
	.wwd__item { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
	.wwd__areas { grid-template-columns: minmax(0, 1fr); gap: 36px; }
	.wwd__items { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.wwd__item { grid-template-columns: 96px minmax(0, 1fr); }
}
