/* ADM brand layer (ADM-WEB-001). Loaded last: navy chrome, pan-African green actions, gold highlight, red = urgent only. */
:root {
  --adm-navy: #10263D;
  --adm-green: #147D64;
  --adm-green-2: #0f6350;
  --adm-gold: #D6A544;
  --adm-red: #C63F3F;
  --adm-accent: #147D64;
  --adm-accent-dark: #0f6350;
  --adm-accent-soft: rgba(20, 125, 100, 0.1);
  --adm-bg: #F4F6F8;
  /* Category colours darkened so white chip text meets WCAG AA (4.5:1) */
  --adm-b-2: #ad4a12;
  --adm-b-4: #076f6f;
}
[data-theme="dark"] {
  --adm-navy: #0b1a2b;
  --adm-green: #3dbf9c;      /* readable on dark surfaces */
  --adm-green-2: #2f9c7e;
  --adm-accent: #3dbf9c;
  --adm-accent-soft: rgba(61, 191, 156, 0.14);
  --adm-bg: #0e1016;
}

/* Chrome: top bar + main nav */
html body .adm-header .adm-topbar,
html body .adm-header .adm-nav,
html body .adm-header .adm-nav#header_bottom_h1,
html body .adm-header .adm-nav.is-stuck#header_bottom_h1 { background: var(--adm-navy) !important; }
html body .adm-header .adm-nav .horizontal-menu > ul > li:hover > a,
html body .adm-header .adm-nav .horizontal-menu > ul > li.current-menu-item > a { background: var(--adm-gold) !important; color: var(--adm-navy) !important; }
/* No "Home" tab any more: don't highlight the first item on the homepage */
html body .adm-header--home .adm-nav .horizontal-menu > ul > li:first-child > a:not(:hover) { background: transparent; color: #fff; }
/* Nine primary items + More must fit one row */
html body .adm-header .adm-nav .horizontal-menu > ul > li > a { padding: 14px 8px; font-size: 11.5px; letter-spacing: 0; }
/* 992-1239px: use the full width and tighter items; below 1100px Live Radio (also in the top bar) drops out */
@media (min-width: 992px) and (max-width: 1239px) {
  html body .adm-header .adm-nav > .container { max-width: 100%; padding-left: 12px; padding-right: 12px; }
  html body .adm-header .adm-nav .horizontal-menu > ul > li > a { padding: 14px 6px; font-size: 11px; }
}
@media (min-width: 992px) and (max-width: 1099px) { html body .adm-header .adm-nav .horizontal-menu > ul > li:nth-last-child(2) { display: none; } }
@media (min-width: 992px) and (max-width: 1049px) { html body .adm-header .adm-nav .horizontal-menu > ul > li > a { padding: 14px 5px; font-size: 10.5px; } }
/* Ten primary items + More: give the bar more room on wide screens, never wrap */
@media (min-width: 1240px) { html body .adm-header .adm-nav > .container { max-width: 1240px; } html body .adm-header .adm-nav .horizontal-menu > ul > li > a { padding: 14px 10px; font-size: 12px; } }
/* Top bar: date | utility links (Company dropdown holds the secondary ones) | tools + auth */
html body .adm-header .adm-topbar-inner { gap: 16px; }
html body .adm-header .adm-topbar-links { flex: 1 1 auto; min-width: 0; overflow: visible; justify-content: center; gap: 18px; }
html body .adm-header .adm-topbar-links > a,
html body .adm-header .adm-topbar-links summary { white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; line-height: 1; }
html body .adm-header .adm-topbar-links .adm-live-pill { margin-left: 2px; }
.adm-topmore ul { left: 0; right: auto; min-width: 170px; }
.adm-topmore ul a { color: var(--adm-ink) !important; white-space: nowrap; }
.adm-topmore ul a:hover { background: var(--adm-surface-2); }
html body .adm-header .adm-topbar-right { gap: 12px; }
/* Mid widths: keep Live Radio, Company and Contact; the rest returns on wider screens */
@media (min-width: 992px) and (max-width: 1199px) {
  html body .adm-header .adm-topbar-links { gap: 12px; }
  html body .adm-header .adm-topbar-links > a:last-of-type { display: none; }
}
/* Secondary ("More") menu: wide, right-aligned so it never overflows the viewport */
.adm-nav .horizontal-menu > ul > li:last-child > .submenu { right: 0; left: auto; min-width: 300px; }
.adm-nav .horizontal-menu > ul > li:last-child > .submenu a { white-space: normal; }

/* Urgent news only uses editorial red */
.breaking--news .breaking-title, .adm-live-pill { background: var(--adm-red); }
.adm-live-pill.is-off { background: var(--adm-muted); }

/* Dark mode: keep white-on-green filled blocks dark enough (the dark green token is a light text colour) */
[data-theme="dark"] .adm-player { background: #0f6350; }
[data-theme="dark"] .adm-player-btn { color: #0f6350; }

/* Homepage blocks: follow-up, intelligence, multimedia */
.adm-block-row { margin: 26px 0; }
.adm-block-sub { margin: -6px 0 12px; font-size: 13px; color: var(--adm-muted); }
.adm-cards-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.adm-mini-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: var(--adm-surface); border: 1px solid var(--adm-home-border); border-top: 3px solid var(--adm-green); border-radius: 4px; color: var(--adm-ink); text-decoration: none; }
.adm-mini-card:hover { border-top-color: var(--adm-gold); }
.adm-mini-card strong { font-size: 14px; line-height: 1.35; }
.adm-mini-card small { color: var(--adm-muted); font-size: 12px; }
.adm-mini-card--cta { background: var(--adm-navy); color: #fff; border-top-color: var(--adm-gold); }
.adm-mini-card--cta small { color: #c5d0dc; }
/* Named adm-pill (not adm-chip): .adm-chip is the existing coloured category/topic chip and must not be overridden. */
.adm-pill { align-self: flex-start; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 3px; background: var(--adm-surface-2); color: var(--adm-ink); }
.adm-pill--ok { background: #dcf3ea; color: #0b5a45; }
.adm-pill--mid { background: #fbf0d6; color: #6b4a07; }
.adm-pill--bad { background: #f8dede; color: #8c2323; }
@media (max-width: 991px) { .adm-cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { .adm-cards-4 { grid-template-columns: 1fr; } }

/* Press Office + company directory */
.po-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.po-kpis > div { background: var(--adm-navy); color: #fff; border-radius: 6px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.po-kpis strong { font: 800 26px/1.1 var(--adm-body); }
.po-kpis span { font-size: 12px; color: #c5d0dc; }
.po-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--adm-home-border); margin-bottom: 20px; flex-wrap: wrap; }
.po-tabs a { padding: 10px 16px; font-weight: 700; font-size: 14px; color: var(--adm-ink-soft); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.po-tabs a:hover { color: var(--adm-ink); }
.po-tabs a.is-active { color: var(--adm-green); border-bottom-color: var(--adm-gold); }
.po-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.po-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.po-filters input, .po-filters select { flex: 1 1 150px; min-width: 0; padding: 9px 10px; border: 1px solid var(--adm-border-strong); border-radius: 4px; background: var(--adm-surface); color: var(--adm-ink); }
.po-filters input { flex: 2 1 220px; }
.po-filters button { padding: 9px 18px; border: 0; border-radius: 4px; background: var(--adm-green); color: #fff; font-weight: 700; }
.po-active { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.po-card { padding: 18px 0; border-bottom: 1px solid var(--adm-home-border); }
.po-card:first-of-type { padding-top: 4px; }
.po-card-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.po-card-meta time { margin-left: auto; font-size: 12px; color: var(--adm-muted); }
.po-card h2 { font: 700 19px/1.3 var(--adm-display); margin: 0 0 6px; }
.po-card h2 a { color: var(--adm-ink); }
.po-card h2 a:hover { color: var(--adm-green); }
.po-card p { margin: 0 0 8px; color: var(--adm-ink-soft); font-size: 14px; line-height: 1.6; }
.po-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.po-card-foot small { color: var(--adm-muted); }
.po-side { display: grid; gap: 16px; position: sticky; top: 90px; }
.po-widget { border: 1px solid var(--adm-home-border); border-radius: 6px; padding: 16px; background: var(--adm-surface); }
.po-widget h3 { font: 800 13px/1.2 var(--adm-body); text-transform: uppercase; letter-spacing: .05em; color: var(--adm-green); margin: 0 0 10px; }
.po-widget ul { list-style: none; margin: 0; padding: 0; }
.po-widget li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--adm-home-border); font-size: 13.5px; }
.po-widget li:last-child { border-bottom: 0; }
.po-widget li span { color: var(--adm-muted); font-size: 12px; }
.po-widget li a { color: var(--adm-ink); }
.po-widget li a.is-active, .po-widget li a:hover { color: var(--adm-green); font-weight: 700; }
.po-widget li.po-news { flex-direction: column; gap: 2px; }
.po-note { font-size: 12.5px; color: var(--adm-muted); margin: 10px 0 0; }
.po-mini-search { display: flex; gap: 6px; }
.po-mini-search input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--adm-border-strong); border-radius: 4px; background: var(--adm-surface); color: var(--adm-ink); }
.po-mini-search button { border: 0; border-radius: 4px; background: var(--adm-green); color: #fff; padding: 0 12px; }
.po-about { font-size: 12.5px; color: var(--adm-ink-soft); }
.adm-paywall { padding: 14px 16px; border-left: 4px solid var(--adm-gold); background: var(--adm-surface-2); border-radius: 4px; margin-bottom: 18px; }
.adm-paywall p { font-size: 13.5px; color: var(--adm-ink-soft); }
@media (max-width: 991px) { .po-layout { grid-template-columns: 1fr; } .po-side { position: static; } .po-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Services + sponsored label */
.adm-independence { padding: 14px 16px; border-left: 4px solid var(--adm-gold); background: var(--adm-surface-2); border-radius: 4px; }
.adm-mini-card > i.fa { color: var(--adm-green); font-size: 20px; }
.adm-enquiry { display: grid; gap: 10px; }
.adm-enquiry label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.adm-enquiry input, .adm-enquiry textarea { padding: 9px 10px; border: 1px solid var(--adm-border-strong); border-radius: 4px; background: var(--adm-surface); color: var(--adm-ink); font-weight: 400; }
.adm-enquiry button { justify-self: start; padding: 10px 20px; border: 0; border-radius: 4px; background: var(--adm-green); color: #fff; font-weight: 700; }
.adm-hp { position: absolute; left: -9999px; height: 0; opacity: 0; }
.adm-sponsored { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border: 1px solid var(--adm-gold); background: #fbf0d6; color: #6b4a07; border-radius: 3px; }

/* Search results */
.adm-results { list-style: none; margin: 0; padding: 0; }
.adm-results li { padding: 14px 0; border-bottom: 1px solid var(--adm-home-border); }
.adm-results a { color: var(--adm-ink); font-size: 16px; }
.adm-results p { margin: 4px 0; color: var(--adm-ink-soft); font-size: 14px; }
.adm-results small { color: var(--adm-muted); }

/* Map */
/* .adm-leaflet (not .adm-map: that class is the homepage Africa SVG) */
.adm-leaflet { height: 560px; border: 1px solid var(--adm-home-border); border-radius: 6px; z-index: 0; }
.adm-map-layers { display: flex; flex-wrap: wrap; gap: 8px 18px; border: 0; margin: 0 0 12px; padding: 0; }
.adm-map-layers legend { font-weight: 800; font-size: 13px; margin-bottom: 6px; }
.adm-map-layers label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.adm-map-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
@media (max-width: 767px) { .adm-leaflet { height: 420px; } }

/* Homepage "Countries" block: SVG map scales with its column, list sits beside it (or below when narrow) */
/* Narrow column (desktop sidebar): map on top, list below. Wide block (tablet): side by side. */
.adm-countries { container-type: inline-size; }
.adm-countries-body { grid-template-columns: 1fr; gap: 12px; align-items: start; }
.adm-countries .adm-map { display: block; width: 100%; max-width: 340px; height: auto; margin: 0 auto; border: 0; }
.adm-countries .adm-flag-list { min-width: 0; }
@container (min-width: 460px) { .adm-countries-body { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; } }

/* Opportunities filter + closing date */
.adm-filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.adm-filter-row input, .adm-filter-row select { flex: 1 1 180px; padding: 9px 10px; border: 1px solid var(--adm-border-strong); border-radius: 4px; background: var(--adm-surface); color: var(--adm-ink); }
.adm-filter-row button { padding: 9px 18px; border: 0; border-radius: 4px; background: var(--adm-green); color: #fff; font-weight: 700; }
.adm-closing-soon { color: var(--adm-red) !important; font-weight: 700; }
.adm-mini-card a { color: inherit; }

/* Accessibility: skip link, text size, high contrast */
.adm-skip { position: absolute; left: 8px; top: -60px; z-index: 10000; background: var(--adm-gold); color: var(--adm-navy); padding: 10px 14px; font-weight: 800; border-radius: 4px; }
.adm-skip:focus { top: 8px; }
.adm-a11y { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.adm-a11y button { box-sizing: border-box; height: 26px; min-height: 0; min-width: 28px; margin: 0; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 4px; font: 700 11px/1 var(--adm-body); padding: 0 6px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.adm-a11y button:hover { border-color: #fff; }
.adm-a11y button[aria-pressed="true"] { background: var(--adm-gold); color: var(--adm-navy); }
html[data-contrast="high"] body { background: #fff; color: #000; }
html[data-contrast="high"][data-theme="dark"] body { background: #000; color: #fff; }
html[data-contrast="high"] a { text-decoration: underline; }
html[data-contrast="high"] .adm-mini-card, html[data-contrast="high"] .adm-briefing, html[data-contrast="high"] .adm-panel { border: 2px solid currentColor; }

/* Accessible focus */
.adm-header a:focus-visible, .adm-player-btn:focus-visible, .adm-briefing-card:focus-visible { outline: 3px solid var(--adm-gold); outline-offset: 2px; }

/* Today's Briefing strip */
.adm-briefing { margin: 22px 0 6px; padding: 16px; border: 1px solid var(--adm-home-border); border-radius: 6px; background: var(--adm-surface); }
.adm-briefing-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.adm-briefing-head h2 { font: 800 16px/1.2 var(--adm-body); margin: 0; color: var(--adm-navy); }
[data-theme="dark"] .adm-briefing-head h2 { color: var(--adm-ink); }
.adm-briefing-head a { font-size: 12px; font-weight: 700; color: var(--adm-green); }
.adm-briefing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.adm-briefing-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-left: 4px solid var(--adm-gold); background: var(--adm-surface-2); color: var(--adm-ink); text-decoration: none; border-radius: 4px; }
.adm-briefing-card.is-empty { border-left-color: var(--adm-border-strong); opacity: .7; }
.adm-briefing-ed { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--adm-green); }
.adm-briefing-ed b { background: var(--adm-navy); color: #fff; border-radius: 10px; padding: 0 7px; margin-left: 4px; }
.adm-briefing-card strong { font-size: 13px; line-height: 1.35; }
@media (max-width: 767px) { .adm-briefing-grid { grid-template-columns: 1fr; } }
