/* AVDP Site Kit — global tokens, typography, accessibility. Applies site-wide. */


/* -------------------------------------------------------------------------
   Design tokens
   Change a value here and it propagates through every component below.
   ---------------------------------------------------------------------- */

:root {
	--avdp-ink: #0a1a12;          /* deep swamp green-black — dark sections   */
	--avdp-ink-2: #12291d;        /* raised dark surface                      */
	--avdp-paper: #f3f5f0;        /* husk white — page background             */
	--avdp-paper-2: #e7ebe2;      /* alternate section background             */
	--avdp-line: #c9d2c4;         /* hairline borders on light                */
	--avdp-line-dark: rgba(255, 255, 255, 0.12);
	--avdp-green: #1b6b44;        /* paddy green — eyebrows, progress         */
	--avdp-green-dim: #3f8a63;
	--avdp-blue: #0b4e9b;         /* Sierra Leone flag blue — primary action  */
	--avdp-blue-dark: #08407f;
	--avdp-ochre: #c98a19;        /* harvest ochre — data + focus ring        */
	--avdp-clay: #8a3b1e;         /* file types, warnings                     */
	--avdp-muted: #5c6d63;
	--avdp-muted-dark: #8fa697;

	--avdp-display: "Bricolage Grotesque", Georgia, serif;
	--avdp-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--avdp-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

	--avdp-radius: 2px;
	--avdp-gutter: clamp(18px, 5vw, 64px);
}

/* -------------------------------------------------------------------------
   Base typography
   ---------------------------------------------------------------------- */

body,
#page-container {
	font-family: var(--avdp-body);
	font-size: 17px;
	line-height: 1.6;
	color: var(--avdp-ink);
	background: var(--avdp-paper);
	-webkit-font-smoothing: antialiased;
}

#page-container h1,
#page-container h2,
#page-container h3,
#page-container h4,
#page-container h5,
#page-container h6,
.et_pb_module h1,
.et_pb_module h2,
.et_pb_module h3,
.et_pb_module h4 {
	font-family: var(--avdp-display);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.025em;
	color: var(--avdp-ink);
}

#page-container h1 {
	font-size: clamp(34px, 5.4vw, 68px);
	letter-spacing: -0.035em;
}

#page-container h2 {
	font-size: clamp(27px, 3.6vw, 46px);
}

#page-container h3 {
	font-size: clamp(21px, 2.2vw, 27px);
}

#page-container p {
	max-width: 72ch;
}

/* Readable measure inside text modules, but never on full-width layouts. */
.et_pb_text_inner > p {
	max-width: 72ch;
}

/* -------------------------------------------------------------------------
   Accessibility
   ---------------------------------------------------------------------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.et_pb_button:focus-visible {
	outline: 3px solid var(--avdp-ochre) !important;
	outline-offset: 2px;
}

/* Links inside body copy must not rely on colour alone. */
.et_pb_text_inner a:not(.et_pb_button) {
	color: var(--avdp-blue);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.et_pb_text_inner a:not(.et_pb_button):hover {
	text-decoration-thickness: 2px;
}

.avdp-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	background: var(--avdp-ink);
	color: #fff;
	padding: 12px 20px;
	font-family: var(--avdp-mono);
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
}

.avdp-skip-link:focus {
	left: 8px;
	top: 8px;
}

@media (prefers-reduced-motion: reduce) {

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* -------------------------------------------------------------------------
   Buttons
   ---------------------------------------------------------------------- */

#page-container .et_pb_button,
#page-container .avdp-btn {
	font-family: var(--avdp-body);
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0;
	padding: 12px 22px !important;
	border-radius: var(--avdp-radius);
	border: 1px solid var(--avdp-blue);
	background: var(--avdp-blue);
	color: #fff;
	transition: background 0.18s ease, transform 0.18s ease;
}

#page-container .et_pb_button:hover,
#page-container .avdp-btn:hover {
	background: var(--avdp-blue-dark);
	border-color: var(--avdp-blue-dark);
	color: #fff;
	transform: translateY(-1px);
	padding: 12px 22px !important;
}

#page-container .et_pb_button:after,
#page-container .et_pb_button:before {
	display: none !important;
}

.avdp-btn--ghost {
	background: transparent !important;
	color: var(--avdp-ink) !important;
	border-color: var(--avdp-ink) !important;
}

.avdp-btn--ghost:hover {
	background: var(--avdp-ink) !important;
	color: #fff !important;
}

/* -------------------------------------------------------------------------
   Section helpers — add these as CSS classes on any Divi section or module
   ---------------------------------------------------------------------- */

.avdp-dark {
	background: var(--avdp-ink) !important;
	color: var(--avdp-paper);
}

.avdp-dark h1,
.avdp-dark h2,
.avdp-dark h3,
.avdp-dark h4,
.avdp-dark .et_pb_text_inner {
	color: #fff !important;
}

.avdp-dark p {
	color: #c7d6cc;
}

.avdp-tinted {
	background: var(--avdp-paper-2) !important;
}

/* Eyebrow label — small mono kicker above a heading. */
.avdp-eyebrow,
.avdp-eyebrow .et_pb_text_inner p {
	font-family: var(--avdp-mono);
	font-size: 11px !important;
	line-height: 1.4;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--avdp-green) !important;
	margin-bottom: 12px;
}

.avdp-dark .avdp-eyebrow,
.avdp-dark .avdp-eyebrow .et_pb_text_inner p {
	color: #8fd3ac !important;
}

/* "As of" date stamp — put this next to any figure. */
.avdp-asof,
.avdp-asof .et_pb_text_inner p {
	font-family: var(--avdp-mono);
	font-size: 11px !important;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--avdp-muted) !important;
}

/* -------------------------------------------------------------------------
   Stat blocks — apply .avdp-stat to a Divi Number Counter or Blurb
   ---------------------------------------------------------------------- */

.avdp-stat .et_pb_number_counter .percent p,
.avdp-stat .et_pb_main_blurb_image,
.avdp-stat h4 {
	font-family: var(--avdp-display) !important;
	font-weight: 700;
	letter-spacing: -0.04em;
	line-height: 1;
}

.avdp-stat .et_pb_number_counter .percent p {
	font-size: clamp(34px, 4vw, 52px) !important;
}

.avdp-stat .title,
.avdp-stat .et_pb_blurb_description {
	font-family: var(--avdp-mono);
	font-size: 10.5px !important;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--avdp-muted);
	margin-top: 8px;
}

.avdp-dark .avdp-stat .title,
.avdp-dark .avdp-stat .et_pb_blurb_description {
	color: var(--avdp-muted-dark);
}

/* Ochre keyline to the left of a pulled-out figure. */
.avdp-stamp {
	border-left: 4px solid var(--avdp-ochre);
	padding-left: 18px;
}

/* -------------------------------------------------------------------------
   Status badges — reusable across procurement, resources and news
   ---------------------------------------------------------------------- */

.avdp-badge {
	display: inline-block;
	font-family: var(--avdp-mono);
	font-size: 10.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 5px 10px;
	border-radius: var(--avdp-radius);
	white-space: nowrap;
}

.avdp-badge--open { background: #8fd3ac; color: #062616; }
.avdp-badge--closing { background: var(--avdp-ochre); color: #221602; }
.avdp-badge--closed,
.avdp-badge--undated { background: transparent; color: var(--avdp-muted); border: 1px solid var(--avdp-muted); }
.avdp-badge--awarded { background: transparent; color: var(--avdp-ink); border: 1px solid var(--avdp-muted); }

.avdp-dark .avdp-badge--awarded { color: #fff; border-color: var(--avdp-muted-dark); }
.avdp-dark .avdp-badge--closed { color: var(--avdp-muted-dark); border-color: #3c5348; }

/* -------------------------------------------------------------------------
   Data table — for the district ledger or any figures table
   ---------------------------------------------------------------------- */

.avdp-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--avdp-paper);
	border: 1px solid var(--avdp-line);
	font-size: 16px;
}

.avdp-table th {
	font-family: var(--avdp-mono);
	font-size: 10.5px;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	text-align: left;
	font-weight: 500;
	color: var(--avdp-muted);
	padding: 14px 16px;
	border-bottom: 1px solid var(--avdp-line);
	white-space: nowrap;
}

.avdp-table td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--avdp-paper-2);
	vertical-align: middle;
}

.avdp-table tr:last-child td {
	border-bottom: 0;
}

.avdp-table tbody tr:hover {
	background: #edf1e9;
}

.avdp-num {
	font-family: var(--avdp-mono);
	font-variant-numeric: tabular-nums;
	text-align: right;
	white-space: nowrap;
}

.avdp-bar {
	position: relative;
	height: 8px;
	min-width: 110px;
	background: var(--avdp-paper-2);
	border-radius: 1px;
	overflow: hidden;
}

.avdp-bar > i {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	background: var(--avdp-green);
	transition: width 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.avdp-bar > i.is-over {
	background: var(--avdp-ochre);
}

@media (max-width: 720px) {

	.avdp-table thead {
		display: none;
	}

	.avdp-table,
	.avdp-table tbody,
	.avdp-table tr,
	.avdp-table td {
		display: block;
		width: 100%;
	}

	.avdp-table tr {
		border-bottom: 1px solid var(--avdp-line);
		padding: 6px 0;
	}

	.avdp-table td {
		border: 0;
		padding: 5px 16px;
	}

	.avdp-num {
		text-align: left;
	}

	.avdp-num::before {
		content: attr(data-label) "  ";
		font-size: 10.5px;
		letter-spacing: 0.1em;
		text-transform: uppercase;
		color: var(--avdp-muted);
	}
}

/* -------------------------------------------------------------------------
   Document list — resources, downloads
   ---------------------------------------------------------------------- */

.avdp-doc {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 18px;
	align-items: center;
	padding: 18px 0;
	border-bottom: 1px solid var(--avdp-line);
	text-decoration: none !important;
}

.avdp-doc:first-child {
	border-top: 1px solid var(--avdp-line);
}

.avdp-doc__type {
	font-family: var(--avdp-mono);
	font-size: 10px;
	letter-spacing: 0.08em;
	background: var(--avdp-clay);
	color: #fff;
	padding: 6px 8px;
	border-radius: var(--avdp-radius);
}

.avdp-doc__type--xls { background: var(--avdp-green); }
.avdp-doc__type--doc { background: var(--avdp-blue); }

.avdp-doc__title {
	font-weight: 600;
	font-size: 16.5px;
	display: block;
}

.avdp-doc:hover .avdp-doc__title {
	color: var(--avdp-blue);
}

.avdp-doc__meta {
	font-family: var(--avdp-mono);
	font-size: 11px;
	letter-spacing: 0.05em;
	color: var(--avdp-muted);
	margin-top: 3px;
	display: block;
}

/* -------------------------------------------------------------------------
   Story cards
   ---------------------------------------------------------------------- */

.avdp-story__tags {
	font-family: var(--avdp-mono);
	font-size: 10.5px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--avdp-green);
	margin: 16px 0 8px;
}

.avdp-story__outcome {
	margin-top: 12px;
	padding-left: 12px;
	border-left: 3px solid var(--avdp-ochre);
	font-size: 15px;
	color: #3b4a41;
}

/* -------------------------------------------------------------------------
   Partner logos — greyscale until hover, so they read as a set
   ---------------------------------------------------------------------- */

.avdp-partners .et_pb_image img {
	filter: grayscale(1);
	opacity: 0.72;
	transition: filter 0.2s ease, opacity 0.2s ease;
	max-height: 56px;
	width: auto;
}

.avdp-partners .et_pb_image img:hover {
	filter: none;
	opacity: 1;
}

/* -------------------------------------------------------------------------
   Divi corrections
   ---------------------------------------------------------------------- */

/* Divi's default blurb icons crowd the text. */
.et_pb_blurb_content {
	max-width: none;
}

/* Kill the forced 80% width on centred text modules at mobile. */
@media (max-width: 767px) {

	.et_pb_row {
		padding: 24px 0;
	}
}

/* Print: donors do print these pages. */
@media print {

	#main-header,
	#main-footer,
	.et_pb_button,
	video {
		display: none !important;
	}

	body {
		font-size: 12pt;
		color: #000;
		background: #fff;
	}
}

/* -------------------------------------------------------------------------
   Divi override layer.

   Divi prints its Customizer CSS (et-divi-customizer-global.css /
   et-core-unified-*.css) after plugin stylesheets, so equal-specificity
   rules above are silently overridden. These raise specificity with
   html body and mark only the properties that must win.
   ---------------------------------------------------------------------- */

html body,
html body #page-container,
html body #et-main-area {
	font-family: var(--avdp-body) !important;
	color: var(--avdp-ink);
}

html body h1,
html body h2,
html body h3,
html body h4,
html body h5,
html body h6,
html body #page-container h1,
html body #page-container h2,
html body #page-container h3,
html body #page-container h4,
html body .et_pb_module h1,
html body .et_pb_module h2,
html body .et_pb_module h3,
html body .et_pb_module h4,
html body .et_pb_module h5,
html body .et_pb_module h6,
html body .et_pb_text h1,
html body .et_pb_text h2,
html body .et_pb_text h3,
html body .et_pb_slide_title,
html body .et_pb_post_title,
html body .entry-title,
html body .et_pb_blurb_container h4 {
	font-family: var(--avdp-display) !important;
	font-weight: 700 !important;
	line-height: 1.05;
	letter-spacing: -0.025em;
}

html body #main-header,
html body #top-menu li a,
html body .et_pb_menu__menu li a {
	font-family: var(--avdp-body) !important;
}

html body #page-container .et_pb_button,
html body .et_pb_button_module_wrapper .et_pb_button {
	font-family: var(--avdp-body) !important;
	border-radius: var(--avdp-radius) !important;
	letter-spacing: 0 !important;
}

html body a:focus-visible,
html body button:focus-visible,
html body input:focus-visible,
html body select:focus-visible,
html body textarea:focus-visible {
	outline: 3px solid var(--avdp-ochre) !important;
	outline-offset: 2px !important;
}
