/**
 * APCC — "network" design layer (loaded last on every front-end page).
 *
 * The approved Cohorts directory is the reference: soft green-grey ground, white
 * cards with a 1px border and 14px radius, deep-green type, green actions. Identity
 * comes from the real cohort network: every page header carries the APCC cohort map
 * (countries shaded by number of cohorts, one ochre dot per cohort site).
 * Ochre is reserved for data marks (map sites, counts, small highlights).
 */

/* ============ Ground and type ============ */
html body {
	background: var(--apcc-mint-50);
	color: var(--apcc-ink);
	font-family: var(--apcc-font);
}
html body :is(h1, h2, h3, h4, .page-title, .hero-title, .section-title, .block-title) {
	font-family: var(--apcc-font-display);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.12;
	color: var(--apcc-green-900);
}
html body main :is(h2, .section-title, .block-title) {
	font-size: clamp(1.75rem, 2.8vw, 2.4rem);
	text-align: left;
	margin: 0 0 1rem;
	padding: 0;
	max-width: 30ch;
}
html body main :is(h3, h4) { text-align: left; }
html body main h3 { font-size: clamp(1.1rem, 1.5vw, 1.3rem); }
html body main :is(h2, h3, .section-title, .block-title)::after { content: none; }
html body main p { max-width: 72ch; }
html body a { text-underline-offset: 3px; }

/* one rhythm for sections */
html body main section { padding-top: 4.5rem; padding-bottom: 4.5rem; }
html body main section + section { padding-top: 0; }
html body main :is(.content-block) { margin-bottom: 3rem; }
html body main :is(.section-header-flex, .section-header) { margin-bottom: 1.5rem; align-items: end; }

/* ============ Header ============ */
html body .site-header { background: var(--apcc-white); border-bottom: 1px solid var(--apcc-mint-200); box-shadow: none; }
html body .site-title { font-family: var(--apcc-font-display); letter-spacing: -0.02em; }
html body .nav-menu > li > a { font-weight: 600; font-size: .95rem; position: relative; }
html body .nav-menu > li:is(.current-menu-item, .current_page_item, .current-menu-ancestor) > a { color: var(--apcc-green-700); }
html body .nav-menu > li:is(.current-menu-item, .current_page_item) > a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--apcc-ochre);
}

/* ============ Buttons ============ */
html body :is(.btn, .apcc-btn, .apcc-cl-btn, .wpcf7-submit, .button-primary) {
	border-radius: var(--apcc-radius-sm);
	text-transform: none;
	letter-spacing: 0;
	font-weight: 700;
	box-shadow: none;
	transform: none;
}
html body .btn { font-size: 1rem; padding: .85rem 1.4rem; min-height: var(--apcc-tap); }
html body :is(.btn-primary, .apcc-btn--primary, .apcc-btn--gold, .wpcf7-submit) {
	background: var(--apcc-green-700); border: 2px solid var(--apcc-green-700); color: #fff;
}
html body :is(.btn-primary, .apcc-btn--primary, .apcc-btn--gold, .wpcf7-submit):hover {
	background: var(--apcc-green-900); border-color: var(--apcc-green-900); color: #fff; transform: none;
}
html body :is(.btn-secondary, .btn-outline, .apcc-btn--outline, .apcc-btn--ghost) {
	background: var(--apcc-white); border: 2px solid var(--apcc-green-700); color: var(--apcc-green-700);
}
html body :is(.btn-secondary, .btn-outline, .apcc-btn--outline, .apcc-btn--ghost):hover {
	background: var(--apcc-mint-100); color: var(--apcc-green-900); border-color: var(--apcc-green-900); transform: none;
}
html body .btn-link { color: var(--apcc-green-700); font-weight: 700; background: none; border: 0; padding-left: 0; padding-right: 0; }

/* ============ Page headers: light band + the cohort map ============ */
html body :is(.page-header, .apcc-pagehead, .apcc-conf .apcc-hero, .apcc-confpage .apcc-hero, .event-header, .news-article__header, .search-hero) {
	position: relative;
	overflow: hidden;
	background-color: var(--apcc-white);
	background-image: var(--apcc-map-url);
	background-repeat: no-repeat;
	background-size: auto 150%;
	background-position: right max(1rem, calc((100vw - 1400px) / 2)) top 10%;
	border-bottom: 1px solid var(--apcc-mint-200);
	color: var(--apcc-ink);
	text-align: left;
	padding: calc(var(--apcc-header-h) + 3.5rem) 0 3.5rem;
	min-height: 0;
}
html body :is(.page-header, .apcc-pagehead, .apcc-conf .apcc-hero, .apcc-confpage .apcc-hero, .event-header, .news-article__header, .search-hero)::before,
html body :is(.page-header, .apcc-pagehead, .apcc-conf .apcc-hero, .apcc-confpage .apcc-hero, .event-header, .news-article__header, .search-hero)::after {
	content: none;
}
html body :is(.page-header, .apcc-pagehead, .apcc-conf .apcc-hero, .apcc-confpage .apcc-hero, .event-header, .news-article__header, .search-hero) :is(.container, .apcc-container, .apcc-wrap) {
	text-align: left;
	position: relative;
	z-index: 1;
}
html body :is(.page-header, .apcc-pagehead, .apcc-conf .apcc-hero, .apcc-confpage .apcc-hero, .event-header, .news-article__header, .search-hero) :is(h1, .page-title, .event-title) {
	color: var(--apcc-green-900);
	font-size: clamp(2.3rem, 4.8vw, 3.75rem);
	line-height: 1.05;
	letter-spacing: -0.03em;
	max-width: 17ch;
	margin: 0 0 1rem;
	text-align: left;
}
html body :is(.page-header, .apcc-pagehead, .apcc-conf .apcc-hero, .apcc-confpage .apcc-hero, .event-header, .news-article__header, .search-hero) :is(p, .page-description, .page-subtitle, .apcc-hero__tag, .apcc-hero__kicker, .partners-hero-copy p, .apcc-lead) {
	color: var(--apcc-text);
	font-size: clamp(1.05rem, 1.4vw, 1.2rem);
	line-height: 1.6;
	max-width: 54ch;
	margin-left: 0;
	margin-right: 0;
	text-align: left;
}
html body :is(.page-header, .apcc-pagehead, .apcc-conf .apcc-hero, .apcc-confpage .apcc-hero, .event-header, .news-article__header) :is(.apcc-backlink a, .apcc-breadcrumb, .apcc-breadcrumb a, .news-article__back a) {
	color: var(--apcc-green-700);
}
html body .apcc-hero__kicker { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--apcc-ochre); font-size: 1rem; margin-bottom: .5rem; }
html body :is(.apcc-hero__cta, .hero-cta, .event-actions, .event-meta-header, .apcc-pills, .partner-type-nav) { justify-content: flex-start; }
html body :is(.apcc-hero .apcc-pill, .event-meta-header span, .event-header .event-info-item) {
	background: var(--apcc-mint-100); color: var(--apcc-green-900); border: 0; border-radius: 999px;
}
html body .event-header .event-header-badge {
	background: var(--apcc-white); color: var(--apcc-green-900); border: 1px solid var(--apcc-mint-200);
	border-radius: var(--apcc-radius); box-shadow: none; margin: 0 0 1.25rem; backdrop-filter: none;
}
html body .event-header .event-header-badge * { color: var(--apcc-green-900); }
html body .event-header .btn { color: var(--apcc-green-700); border-color: var(--apcc-green-700); background: var(--apcc-white); }
html body .partners-hero :is(.partners-hero-layout, .partners-hero-content, .partners-hero-copy) { margin-left: 0; text-align: left; }
html body .partners-hero .partner-type-chip {
	background: var(--apcc-white); color: var(--apcc-green-900); border: 1px solid var(--apcc-mint-200); backdrop-filter: none;
}
html body .partners-hero .partner-type-chip:hover { background: var(--apcc-mint-100); color: var(--apcc-green-900); border-color: var(--apcc-green-600); }
html body .partners-hero .partner-type-chip-icon { background: var(--apcc-mint-100); color: var(--apcc-green-700); }
html body .partners-hero .partner-type-nav { margin-top: 2rem; max-width: 900px; }
@media (max-width: 900px) {
	html body :is(.page-header, .apcc-pagehead, .apcc-conf .apcc-hero, .apcc-confpage .apcc-hero, .event-header, .news-article__header, .search-hero) {
		background-size: 300px auto;
		background-position: right -90px top calc(var(--apcc-header-h) - 10px);
		padding-top: calc(var(--apcc-header-h) + 2rem);
		padding-bottom: 2.5rem;
	}
	html body :is(.page-header, .apcc-pagehead, .apcc-conf .apcc-hero, .apcc-confpage .apcc-hero, .event-header, .news-article__header) :is(p, .page-description) { max-width: 38ch; }
}

/* ============ Home: map hero ============ */
html body .net-hero {
	background: var(--apcc-white);
	border-bottom: 1px solid var(--apcc-mint-200);
	color: var(--apcc-ink);
	text-align: left;
	padding: calc(var(--apcc-header-h) + 2.5rem) 0 3rem;
	min-height: 0;
	overflow: hidden;
}
html body .net-hero::before, html body .net-hero::after { content: none; }
html body .net-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
	gap: clamp(2rem, 4vw, 4rem);
	align-items: center;
}
html body .net-hero .hero-title {
	color: var(--apcc-green-900);
	font-size: clamp(2.4rem, 4.6vw, 4.1rem);
	line-height: 1.04;
	letter-spacing: -0.035em;
	max-width: 16ch;
	margin: 0 0 1.25rem;
	text-align: left;
}
html body .net-hero .hero-subtitle { color: var(--apcc-text); font-size: clamp(1.05rem, 1.4vw, 1.25rem); margin: 0 0 2rem; max-width: 44ch; text-align: left; }
html body .net-hero .hero-cta { justify-content: flex-start; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; }
html body .net-stats {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem;
	margin: 2.75rem 0 0; padding: 1.5rem 0 0; border-top: 1px solid var(--apcc-mint-200); max-width: 40rem;
}
html body .net-stats dt { order: 2; font-size: .85rem; font-weight: 600; color: var(--apcc-muted); line-height: 1.3; }
html body .net-stats dd {
	margin: 0 0 .25rem; font-family: var(--apcc-font-display); font-weight: 700; font-size: clamp(1.8rem, 3vw, 2.5rem);
	letter-spacing: -0.03em; line-height: 1; color: var(--apcc-green-900); font-variant-numeric: tabular-nums;
}
html body .net-stats div { display: flex; flex-direction: column-reverse; }
html body .net-hero__map { margin: 0; }
html body .net-hero__map figcaption { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .6rem; font-size: .85rem; color: var(--apcc-muted); margin-top: .5rem; }
.net-map { width: 100%; height: auto; display: block; max-height: 640px; }
.net-land { fill: #e3e8e1; stroke: #fff; stroke-width: 1.2; transition: fill .2s; }
.net-l1 { fill: #cfe1d3; } .net-l2 { fill: #a9cbb3; } .net-l3 { fill: #6fa684; } .net-l4 { fill: #2f7a4b; }
.net-site { fill: var(--apcc-ochre); stroke: #fff; stroke-width: 2; transition: r .15s; }
.net-map a:is(:hover, :focus-visible) .net-site { r: 10; fill: var(--apcc-green-900); }
.net-map a { cursor: pointer; }
.net-key { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.net-key--site { background: var(--apcc-ochre); margin-left: 0; }
.net-key--land { background: #2f7a4b; border-radius: 3px; margin-left: .6rem; }
@media (max-width: 900px) {
	html body .net-hero__grid { grid-template-columns: 1fr; }
	html body .net-hero__map { order: -1; max-width: 420px; margin: 0 auto; }
	html body .net-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	html body .net-hero { padding-top: calc(var(--apcc-header-h) + 1rem); }
}

/* ============ Cards: the approved directory card, everywhere ============ */
html body :is(.value-card, .principle-card, .pathway-card, .program-card, .collab-type-card, .scope-card, .cohort-card,
	.news-card, .news-list-card, .partner-card, .partner-directory-card, .policy-section, .difference-item, .ecosystem-item,
	.priority-item, .governance-summary-card, .search-result-card, .pw-card, .news-mini-card, .contact-detail-item,
	.vision-box, .mission-box, .data-principle-item, .timeline-content, .event-page-card, .event-list-card,
	.event-sidebar-card, .contact-cta, .governance-body-card, .apcc-card, .apcc-step, .apcc-tl, .apcc-stat, .metric-card) {
	background: var(--apcc-white);
	border: 1px solid var(--apcc-mint-200);
	border-radius: var(--apcc-radius);
	box-shadow: none;
	padding: 1.5rem;
	text-align: left;
	transform: none;
}
html body :is(.value-card, .principle-card, .pathway-card, .program-card, .cohort-card, .news-card, .partner-directory-card, .event-page-card, .collab-type-card):hover {
	border-color: var(--apcc-mint-300); box-shadow: var(--apcc-shadow); transform: none;
}
html body :is(.value-card, .principle-card, .difference-item, .ecosystem-item, .collab-type-card, .pathway-card, .data-principle-item, .scope-card, .priority-item) :is(h3, h4, p) { text-align: left; }
/* icon marks: small tinted squares, left-aligned */
html body :is(.value-icon, .pathway-icon, .cohort-icon, .nav-icon, .doc-icon, .detail-icon, .difference-icon, .principle-icon, .collab-icon, .body-icon) {
	width: 44px; height: 44px; min-width: 44px; display: inline-grid; place-items: center; margin: 0 0 1rem;
	background: var(--apcc-mint-100); color: var(--apcc-green-700); border-radius: 10px; box-shadow: none; font-size: 1.1rem;
}
html body :is(.value-card, .difference-item, .principle-card) > i:first-child {
	display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 1rem;
	background: var(--apcc-mint-100); color: var(--apcc-green-700); border-radius: 10px; font-size: 1.1rem;
}
/* the dark purpose/hosting/CTA panels become quiet tinted panels */
html body :is(.purpose-box, .hosting-box, .cta-box, .cta-card, .collaboration-cta, .governance-cta, .event-sidebar-cta, .apcc-actionband) {
	background: var(--apcc-mint-100);
	color: var(--apcc-ink);
	border: 0;
	border-radius: var(--apcc-radius);
	box-shadow: none;
}
html body :is(.purpose-box, .hosting-box, .cta-box, .cta-card, .collaboration-cta, .governance-cta, .event-sidebar-cta, .apcc-actionband) :is(h2, h3, h4, p, i, span) { color: var(--apcc-green-900); }
html body :is(.purpose-box, .cta-box, .cta-card, .event-sidebar-cta, .apcc-actionband)::before { content: none; }
/* governance body cards: header row, no dark plate */
html body .governance-body-card { padding: 0; overflow: hidden; }
html body .governance-body-card .body-header { background: transparent; padding: 1.5rem 1.5rem 0; border: 0; }
html body .governance-body-card .body-header :is(h3, i) { color: var(--apcc-green-900); }
html body .governance-body-card :is(.body-content, .body-body) { padding: 1rem 1.5rem 1.5rem; }
html body :is(.body-badge, .badge-status, .partner-type-badge) { background: var(--apcc-ochre-soft); color: var(--apcc-ochre); border: 0; border-radius: 999px; font-weight: 700; }

/* rows of columns: natural stretch, actions on a shared baseline, titles/excerpts aligned */
html body main :is(.news-grid, .partner-directory-grid, .cohorts-grid, .events-grid, .values-grid, .difference-grid,
	.programs-grid, .scope-grid, .governance-summary-grid, .collab-types-grid, .data-principles-grid, .pathways-grid,
	.principles-grid, .vision-mission-grid, .apcc-grid, .apcc-stats__grid) { align-items: stretch; }
html body main :is(.news-card, .partner-directory-card, .cohort-card, .value-card, .program-card, .principle-card,
	.pathway-card, .collab-type-card, .scope-card, .difference-item) { display: flex; flex-direction: column; height: 100%; }
html body main :is(.news-card, .partner-directory-card, .cohort-card, .program-card, .pathway-card) :is(.btn, .btn-link, .partner-directory-link, .read-more) {
	margin-top: auto; align-self: flex-start;
}
html body main :is(.news-card, .cohort-card) h3 {
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; min-height: calc(3 * 1.25em); line-height: 1.25;
}
html body main :is(.news-excerpt, .cohort-excerpt, .news-card p:not(.news-meta)) {
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
html body main .news-content { display: flex; flex-direction: column; flex: 1; }

/* ============ Figures and metadata ============ */
html body :is(.metric-value, .apcc-stat__n, .stat-number) {
	font-family: var(--apcc-font-display); font-weight: 700; letter-spacing: -0.03em; color: var(--apcc-green-900); font-variant-numeric: tabular-nums;
}
html body :is(.apcc-stat__l, .metric-label) { font-size: .85rem; letter-spacing: 0; text-transform: none; color: var(--apcc-muted); font-weight: 600; }
html body :is(.apcc-eyebrow, .apcc-cl-eyebrow, .news-article__eyebrow, .apcc-hero__rule) { display: none; }

/* conference landing */
html body .apcc-confpage .apcc-section--alt { background: var(--apcc-white); border-top: 1px solid var(--apcc-mint-200); border-bottom: 1px solid var(--apcc-mint-200); }
html body .apcc-confpage .apcc-track { background: var(--apcc-white); border: 1px solid var(--apcc-mint-200); border-radius: var(--apcc-radius-sm); box-shadow: none; }
html body .apcc-confpage .apcc-track__n { background: var(--apcc-ochre-soft); color: var(--apcc-ochre); }
html body .apcc-confpage .apcc-stats { margin-top: -2rem; }
html body .apcc-confpage .apcc-note { border: 0; border-radius: var(--apcc-radius-sm); background: var(--apcc-gold-soft); }

/* forms */
html body :is(.apcc-form, .apcc-conf .apcc-card) { border-radius: var(--apcc-radius); border: 1px solid var(--apcc-mint-200); box-shadow: none; }
html body :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="password"], input[type="search"], select, textarea) {
	border-radius: var(--apcc-radius-sm);
}

/* ============ Footer ============ */
html body .site-footer { background: var(--apcc-green-900); }
html body .site-footer::before, html body .site-footer::after { content: none; }
html body .site-footer .footer-bottom { background: var(--apcc-green-950); }
html body .footer-title { font-family: var(--apcc-font-display); color: #fff; }
html body .footer-title::after { content: none; }

@media (max-width: 768px) {
	html body main section { padding-top: 3rem; padding-bottom: 3rem; }
	html body main section + section { padding-top: 0; }
}

/* ---------- Fix batch ---------- */
html body main :is(h2, .section-title, .block-title) { display: block; margin-left: 0; margin-right: 0; }
html body main :is(.content-block, .about-intro, .governance-intro, .partners-intro, .section-header) { text-align: left; }
/* cohort profile keeps its dark header: white title */
html body .apcc-cl-phero :is(h1, .apcc-cl-phero-full, .apcc-cl-breadcrumb, .apcc-cl-breadcrumb a) { color: #fff; }
/* header map: fixed size in the top-right corner, never behind the title */
html body :is(.page-header, .apcc-pagehead, .apcc-conf .apcc-hero, .apcc-confpage .apcc-hero, .event-header, .news-article__header, .search-hero) {
	background-size: auto min(440px, calc(100% - var(--apcc-header-h) - 1.5rem));
	background-position: right max(1rem, calc((100vw - 1400px) / 2 + 1rem)) top calc(var(--apcc-header-h) + .5rem);
}
@media (max-width: 1100px) {
	html body :is(.page-header, .apcc-pagehead, .apcc-conf .apcc-hero, .apcc-confpage .apcc-hero, .event-header, .news-article__header, .search-hero) { background-image: none; }
}
/* home hero: left-aligned everywhere */
html body .net-hero :is(.container, .net-hero__copy, .hero-cta, .net-stats) { text-align: left; }
html body .net-hero .net-stats div { align-items: flex-start; }
@media (max-width: 900px) {
	html body .net-hero .hero-cta { flex-direction: row; align-items: center; }
	html body .net-hero .hero-cta .btn { width: auto; }

}
/* values/difference: title sits directly above its text */
html body :is(.value-card, .difference-item, .principle-card) :is(h3, h4) { margin: 0 0 .4rem; }
html body :is(.value-card, .difference-item, .principle-card) p { margin: 0; }
html body .partner-directory-heading::after, html body .partner-directory-heading h2::after { content: none; }
