/* The Pulse Africa - continental home (templates/africa.html). Theme variables only, so light and dark both work. */
.main-content:has(.ghx-af) { padding-top: 0 !important; animation: none; }
.ghx-af .ghx-flagline { background: linear-gradient(90deg, #C1272D 0 25%, #F26A21 25% 50%, #FCD116 50% 75%, #006B3F 75%); }
.ghx-af .ghx-bg { background: radial-gradient(90% 80% at 76% 48%, rgba(242,106,33,.16), transparent 60%), #050608; }
.ghx-af .ghx-chip { gap: .45rem; }
.ghx-af .ghx-btn .country-flag { margin-right: .15rem; }

.af-body { max-width: 1240px; margin: 0 auto; padding: 3.5rem 1.25rem 4rem; }
.af-section { margin: 0 0 4rem; scroll-margin-top: calc(var(--navbar-height, 64px) + 1rem); }
.af-panel { border: 1px solid var(--border-color); border-radius: 22px; background: var(--bg-card); padding: 1.4rem 1.5rem; }
.af-panel h3 { margin: 0 0 .8rem; font: 700 .72rem var(--font-heading); letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }

/* Country selector */
.af-countries { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; }
@media (min-width: 1100px) { .af-countries { grid-template-columns: repeat(6, 1fr); } .af-countries > .af-country { grid-column: span 2; } .af-countries > .af-country:nth-child(-n+2) { grid-column: span 3; } .af-countries > .af-country:nth-child(n+3) dl { grid-template-columns: repeat(3, auto); row-gap: .9rem; } }
.af-country { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 420px; padding: 1.5rem 1.6rem; border-radius: 26px; overflow: hidden;
  color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.1); isolation: isolate; transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s; }
.af-country:hover { color: #fff; text-decoration: none; transform: translateY(-6px); box-shadow: 0 30px 60px -25px rgba(242,106,33,.55); }
.af-country-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s cubic-bezier(.16,1,.3,1); }
.af-country:hover .af-country-bg { transform: scale(1.06); }
.af-country::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(5,6,8,.35) 0%, rgba(5,6,8,.55) 40%, rgba(5,6,8,.94) 100%); }
.af-country-gh:hover { box-shadow: 0 30px 60px -25px rgba(252,209,22,.5); }
.af-country-top { display: flex; align-items: center; justify-content: space-between; }
.af-country-flag .country-flag { width: 42px; height: 28px; border-radius: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.af-country-flag .country-flag::after { font-size: 18px; line-height: 28px; }
.af-country-flag .country-flag-gh::after { font-size: 14px; }
.af-country-tag { padding: .32rem .8rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: rgba(5,6,8,.45); backdrop-filter: blur(8px);
  font: 600 .66rem var(--font-heading); letter-spacing: .14em; text-transform: uppercase; }
.af-country h3 { margin: 0; font: 700 clamp(2.2rem, 4.4vw, 3.4rem)/1 var(--font-body); letter-spacing: -.045em; color: #fff; }
.af-country p { margin: .35rem 0 1.2rem; font: 600 .72rem var(--font-heading); letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.af-country dl { display: grid; grid-template-columns: repeat(5, minmax(0, auto)); justify-content: start; gap: 0 clamp(.8rem, 1.6vw, 1.6rem); margin: 0 0 1.3rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.16); }
.af-country dt { font: 600 .6rem var(--font-heading); letter-spacing: .1em; white-space: nowrap; text-transform: uppercase; color: rgba(255,255,255,.55); }
.af-country dd { margin: .3rem 0 0; font: 600 1.25rem/1 var(--font-body); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.af-country-cta { display: inline-flex; align-items: center; gap: .55rem; font: 600 .9rem var(--font-heading); color: #FFB27A; }
.af-country-gh .af-country-cta { color: #FFE27A; }
.af-country:hover .af-country-cta i { transform: translateX(4px); } .af-country-cta i { transition: transform .25s; }
.af-soon { margin: 1.1rem 0 0; font-size: .85rem; color: var(--text-muted); }
.af-soon i { color: var(--accent); margin-right: .4rem; }

/* Rounds */
.af-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.af-rows { list-style: none; margin: 0; padding: 0; }
.af-rows li + li { border-top: 1px solid var(--border-color); }
.af-rows a { display: flex; align-items: center; gap: .85rem; padding: .7rem 0; color: inherit; text-decoration: none; }
.af-rows a:hover b { color: var(--accent); }
.af-row-main { flex: 1; min-width: 0; }
.af-row-main b { display: block; font: 600 .95rem var(--font-body); color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.af-row-main small, .af-top-card small, .af-news-country { display: flex; align-items: center; gap: .4rem; margin-top: .2rem; font-size: .74rem; color: var(--text-muted); }
.af-rows em, .af-top-card em { font: 600 1rem var(--font-body); font-style: normal; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text-primary); white-space: nowrap; }
.af-logo { position: relative; flex: none; width: 38px; height: 38px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--bg-secondary, rgba(127,127,127,.12)); border: 1px solid var(--border-color); }
.af-logo b { font: 700 .9rem var(--font-heading); color: var(--text-secondary); }
.af-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }

/* Chart */
.af-legend { display: flex; gap: 1rem; font-size: .8rem; color: var(--text-secondary); }
.af-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.af-dot { width: 10px; height: 10px; border-radius: 3px; }
.af-dot-ma, .af-seg-ma { background: linear-gradient(180deg, #FF9A4D, #F26A21); }
.af-dot-gh, .af-seg-gh { background: linear-gradient(180deg, #FFE27A, #E0B400); }
.af-dot-ke, .af-seg-ke { background: linear-gradient(180deg, #5FD39A, #1FA35C); }
.af-dot-eg, .af-seg-eg { background: linear-gradient(180deg, #E9CF7A, #C9A227); }
.af-dot-za, .af-seg-za { background: linear-gradient(180deg, #9DB4FF, #406EFF); }
.af-dot-ci, .af-seg-ci { background: linear-gradient(180deg, #FFC680, #F77F00); }
.af-dot-sn, .af-seg-sn { background: linear-gradient(180deg, #7EE0A6, #00A651); }
.af-dot-rw, .af-seg-rw { background: linear-gradient(180deg, #8CD8FF, #1E9BE0); }
.af-dot-ng, .af-seg-ng { background: linear-gradient(180deg, #5EEAD4, #0F9F8F); }
.af-dot-tn, .af-seg-tn { background: linear-gradient(180deg, #FF8A9C, #E0314B); }
.af-chart { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .8rem; align-items: end; padding-top: 1.8rem; }
.af-col { display: flex; flex-direction: column; align-items: center; gap: .35rem; min-width: 0; }
.af-col-val { font: 600 .72rem var(--font-body); color: var(--text-secondary); white-space: nowrap; min-height: 1em; }
.af-col-bar { width: 100%; max-width: 64px; height: 220px; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 8px 8px 3px 3px; overflow: hidden; background: rgba(127,127,127,.08); }
.af-col-bar i { display: block; width: 100%; min-height: 0; }
.af-col-year { font: 700 .78rem var(--font-heading); color: var(--text-primary); }
.af-col-n { font-size: .66rem; color: var(--text-muted); white-space: nowrap; }

/* Top startups */
.af-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.af-top-card { position: relative; display: flex; flex-direction: column; gap: .3rem; padding: 1.3rem; border: 1px solid var(--border-color); border-radius: 20px; background: var(--bg-card); color: inherit; text-decoration: none; transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .3s; }
.af-top-card:hover { transform: translateY(-4px); border-color: var(--accent); text-decoration: none; color: inherit; }
.af-top-card .af-logo { width: 46px; height: 46px; margin-bottom: .5rem; }
.af-top-card > b { font: 600 1.05rem var(--font-body); color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-top-card em { margin-top: .6rem; font-size: 1.5rem; color: var(--accent); }
.af-rank { position: absolute; top: 1.1rem; right: 1.2rem; font: 700 .72rem var(--font-heading); letter-spacing: .1em; color: var(--text-muted); }
.af-news-country { margin-top: 0; }
.af-note { font-size: .8rem; color: var(--text-muted); border-top: 1px solid var(--border-color); padding-top: 1.2rem; }
.af-note i { margin-right: .4rem; }

@media (max-width: 992px) {
  .af-countries, .af-two { grid-template-columns: 1fr; }
  .af-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .af-country { min-height: 360px; }
  .af-country dl { grid-template-columns: repeat(3, auto); row-gap: .9rem; }
  .af-col-n, .af-col-val { display: none; }
  .af-col-bar { height: 160px; }
  .af-body { padding-top: 2.5rem; }
}
@media (max-width: 520px) { .af-top { grid-template-columns: 1fr; } .af-chart { gap: .35rem; } .af-col-year { font-size: .62rem; } }

/* Continental sections */
.af-head-note { margin: 0; font-size: .8rem; color: var(--text-muted); }
.af-head-note a, .af-sources a { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 2px; }
.af-emoji { font-size: .95em; line-height: 1; }
.af-row-rank { flex: none; width: 1.6rem; font: 700 .7rem var(--font-heading); letter-spacing: .08em; color: var(--text-muted); }
.af-col.is-partial .af-col-bar i { opacity: .5; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.35) 0 4px, transparent 4px 8px), linear-gradient(180deg, #FF9A4D, #F26A21); }
.af-two-gap { margin-top: 1.2rem; }
.af-hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.af-hbars li, .af-hbars li > a { display: grid; grid-template-columns: minmax(7.5rem, 11rem) 1fr auto; align-items: center; gap: .8rem; color: inherit; text-decoration: none; }
.af-hbars li > a { grid-column: 1 / -1; }
.af-hbar-name { display: flex; align-items: center; gap: .45rem; font-size: .86rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-hbar-track { height: 10px; border-radius: 6px; background: rgba(127,127,127,.12); overflow: hidden; }
.af-hbar-track b { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #F26A21, #FF9A4D); opacity: .55; }
.af-hbars .is-edition .af-hbar-track b { opacity: 1; }
.af-hbars .is-edition .af-hbar-name { font-weight: 700; }
.af-hbars li > a:hover .af-hbar-name { color: var(--accent); }
.af-hbars em { font: 600 .86rem var(--font-body); font-style: normal; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.af-uni { position: absolute; left: 4.6rem; top: 1.75rem; font: 600 .62rem var(--font-heading); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.af-unicorns { margin-top: 1.2rem; }
.af-chips { display: flex; flex-wrap: wrap; gap: .55rem; }
.af-chips a { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .8rem; border: 1px solid var(--border-color); border-radius: 999px; font-size: .84rem; color: var(--text-primary); text-decoration: none; transition: border-color .2s; }
.af-chips a:hover { border-color: var(--accent); }
.af-chips span:not(.country-flag):not(.af-emoji) { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.af-sources { display: block; margin-top: .5rem; }
@media (max-width: 520px) { .af-hbars li, .af-hbars li > a { grid-template-columns: 6.5rem 1fr auto; gap: .5rem; } }

/* ---- Opening cinematic (static/js/pulse-opening.js) ---- */
.afo { display: none; }
html.afo-on { overflow: hidden; }
html.afo-on .navbar, html.afo-on body > nav, html.afo-on body > header { visibility: hidden; }
html.afo-on .afo, .afo.afo-out { display: block; position: fixed; inset: 0; z-index: 2147483000; background: radial-gradient(80% 70% at 60% 50%, #0b0c10, #040507 75%); overflow: hidden; }
.afo.afo-out { opacity: 0; pointer-events: none; transition: opacity .9s ease; }
.afo canvas { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .6s ease; }
.afo-roll { --afl: 2.15rem; position: absolute; left: max(1.6rem, 6vw); top: 50%; transform: translateY(-50%); height: calc(var(--afl) * 9); width: min(30vw, 360px); overflow: hidden; opacity: 0;
  -webkit-mask-image: linear-gradient(transparent, #000 40%, #000 60%, transparent); mask-image: linear-gradient(transparent, #000 40%, #000 60%, transparent); }
.afo-roll::before { content: ''; position: absolute; left: 0; top: 50%; width: 2px; height: 1.3rem; margin-top: -.65rem; background: #F26A21; }
.afo-roll::after { content: ''; position: absolute; left: 0; right: 0; top: calc(50% + var(--afl) / 2); height: 1px; background: linear-gradient(90deg, rgba(255,194,122,.45), rgba(255,194,122,0)); }
.afo-roll-in { will-change: transform; }
.afo-it { height: var(--afl); padding-left: 1rem; display: grid; grid-template-columns: 1.7rem 1fr auto; align-items: center; column-gap: .8rem; white-space: nowrap; }
.afo-it i { font: 500 10px ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .08em; font-style: normal; color: rgba(255,194,122,.55); }
.afo-it span { font: 600 clamp(.82rem, 1.25vw, 1.05rem)/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.42); overflow: hidden; text-overflow: ellipsis; }
.afo-it em { font: 500 10px ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .2em; font-style: normal; color: rgba(255,255,255,.28); }
.afo-it.on span { color: #fff; }
.afo-it.on em { color: #FFC27A; }
.afo-it-ma.on span { color: #FF8A3D; }
.afo-it-gh.on span { color: #FCD116; }
.afo-it-ke.on span { color: #2EBE70; }
.afo-it-tn.on span { color: #F04660; }
.afo-it-ng.on span { color: #14B8A6; }
.afo-it-eg.on span { color: #E0BF55; }
.afo-it-za.on span { color: #7D9BFF; }
.afo-it-ci.on span { color: #FFB04D; }
.afo-it-sn.on span { color: #2FD07A; }
.afo-it-rw.on span { color: #38B6FF; }
.afo-hud { position: absolute; left: max(1.6rem, 6vw); top: 1.6rem; display: flex; align-items: center; gap: .55rem; font: 500 10px ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .3em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.afo-hud i { width: 5px; height: 5px; border-radius: 50%; background: #F26A21; }
.afo-hud b { color: #FFC27A; font-weight: 500; font-variant-numeric: tabular-nums; }
.afo-title { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 53vh; gap: 1.1rem; text-align: center; opacity: 0; pointer-events: none; transition: opacity .7s ease; }
.afo-title img { height: clamp(22px, 2.6vw, 34px); width: auto; }
.afo-title strong { display: flex; padding-left: .32em; font: 700 clamp(2.6rem, 9vw, 7.5rem)/1 var(--font-body); letter-spacing: .32em; color: #fff; }
.afo-title strong span { display: inline-block; opacity: 0; transform: translateY(.18em); transition: opacity .7s ease, transform .9s cubic-bezier(.16,1,.3,1); transition-delay: calc(.1s + var(--i) * .06s); }
.afo-title p { position: relative; margin: 0; padding-top: 1.1rem; font: 500 clamp(.6rem, 1vw, .78rem) ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .4em; text-transform: uppercase; color: #FFC27A; opacity: 0; transition: opacity .7s ease .55s; }
.afo-title p::before { content: ''; position: absolute; left: 50%; top: 0; width: 120px; height: 1px; margin-left: -60px; background: #F26A21; transform: scaleX(0); transition: transform .9s cubic-bezier(.16,1,.3,1) .4s; }
.afo-title-on .afo-title { opacity: 1; }
.afo-title-on .afo-title strong span { opacity: 1; transform: none; }
.afo-title-on .afo-title p { opacity: 1; }
.afo-title-on .afo-title p::before { transform: scaleX(1); }
.afo-title-on .afo-hud { opacity: 0; transition: opacity .5s ease; }
.afo-stats { position: absolute; left: max(1.6rem, 6vw); right: max(1.6rem, 6vw); bottom: 2.2rem; display: flex; gap: clamp(1.4rem, 3.2vw, 3.4rem); padding-top: 1.1rem; border-top: 1px solid rgba(255,255,255,.1); }
.afo-stat { opacity: 0; transform: translateY(8px); transition: opacity .6s ease, transform .8s cubic-bezier(.16,1,.3,1); }
.afo-stat.on { opacity: 1; transform: none; }
.afo-stat strong { display: block; font: 700 clamp(1.3rem, 2.3vw, 2.1rem)/1 var(--font-body); letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }
.afo-stat span { display: block; margin-top: .45rem; font: 500 9.5px ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.afo-skip { position: absolute; right: max(1.2rem, 6vw); top: 1.1rem; padding: .55rem 1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(5,6,8,.5); backdrop-filter: blur(8px);
  font: 500 .7rem var(--font-body); letter-spacing: .08em; color: rgba(255,255,255,.6); cursor: pointer; }
.afo-skip:hover, .afo-skip:focus-visible { color: #fff; border-color: #F26A21; }
.afo-skip i { margin-left: .4rem; font-size: .7em; }
@media (max-width: 699px) {
  .afo-roll { --afl: 1.8rem; left: 50%; top: auto; bottom: 7.2rem; transform: translateX(-50%); height: calc(var(--afl) * 5); width: min(84vw, 320px); }
  .afo-stats { bottom: 1.3rem; justify-content: space-between; gap: .8rem; padding-top: .8rem; }
  .afo-stat:nth-child(n+4) { display: none; }
  .afo-stat span { font-size: 8px; letter-spacing: .12em; }
  .afo-hud { top: 1.5rem; font-size: 0; gap: 0; }
  .afo-hud i { margin-right: .55rem; }
  .afo-hud b { font-size: 10px; }
  .afo-skip { padding: .4rem .8rem; }
  .afo-it span { font-size: .85rem; }
}
/* after the opening, the hero skips its own intro and rises at once */
.ghx-fast .ghx-intro, .ghx-fast .ghx-lb { display: none !important; }
.ghx-fast .ghx-flagline { animation-delay: .1s !important; }
.ghx-fast .ghx-ch[data-ch="0"] > *, .ghx-fast .ghx-hud, .ghx-fast .ghx-rail, .ghx-fast .ghx-scroll, .ghx-fast .ghx-corner { animation-delay: calc(.15s + var(--s, 0) * .09s) !important; }
.ghx-fast .ghx-title .w { animation-delay: calc(.2s + var(--wi) * .07s) !important; }

/* hero: country buttons sit under the editions line */
.ghx-actions-below { margin-top: 1.1rem; }

/* hero figures: orange numbers, black on orange when hovered (first screen and the chapters reached by scrolling) */
.ghx-af .ghx-kpi strong { display: inline-block; padding: .08em .22em; margin: -.08em -.22em; border-radius: 8px; color: #FF7A28; transition: color .2s, background-color .2s; }
.ghx-af .ghx-kpi:hover strong, .ghx-af .ghx-kpi:focus-visible strong { color: #000; background: #FF7A28; }
.ghx-af .ghx-fact { transition: background-color .2s, border-color .2s; }
.ghx-af .ghx-fact strong { color: #FF7A28; transition: color .2s; }
.ghx-af .ghx-fact span { transition: color .2s; }
.ghx-af .ghx-fact:hover { background: #FF7A28; border-color: #FF7A28; }
.ghx-af .ghx-fact:hover strong { color: #000; }
.ghx-af .ghx-fact:hover span { color: rgba(0,0,0,.78); }

/* ---- ticker of the latest rounds, under the hero ---- */
.af-ticker { margin: 0; width: 100%; }
.af-ticker a img { width: 22px; height: 22px; border-radius: 6px; object-fit: contain; background: #fff; }
.af-ticker a small { font-size: .74rem; color: var(--text-muted); }
.af-ticker a span { display: inline-flex; align-items: center; gap: .35rem; }

/* ---- funding map ---- */
.af-map { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.af-map-stage { position: relative; }
.af-map svg { display: block; width: 100%; max-height: 620px; margin: 0 auto; overflow: visible; }
.af-map-c { fill: rgba(127,127,127,.16); stroke: var(--bg-card); stroke-width: 1.2; stroke-linejoin: round; outline: none; transition: fill .2s, stroke .2s; }
.af-map-c.has-data { fill: rgba(242,106,33, var(--v, .5)); cursor: default; }
.af-map-c.is-edition { cursor: pointer; }
.af-map-c.on, .af-map-c:focus-visible { stroke: var(--text-primary); stroke-width: 1.6; }
.af-map-c:not(.has-data).on { fill: rgba(127,127,127,.3); }
.af-map-pin { fill: none; stroke: #fff; stroke-width: 1.5; pointer-events: none; transform-box: fill-box; transform-origin: center; animation: afPin 2.4s ease-out infinite; }
@keyframes afPin { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
.af-map-tip { position: absolute; z-index: 3; min-width: 150px; padding: .6rem .8rem; border-radius: 12px; border: 1px solid var(--border-color); background: var(--bg-card); box-shadow: 0 12px 30px -12px rgba(0,0,0,.5); font-size: .8rem; line-height: 1.45; color: var(--text-secondary); pointer-events: none; }
.af-map-tip strong { display: block; margin-bottom: .15rem; font: 700 .9rem var(--font-heading); color: var(--text-primary); }
.af-map-tip b { color: var(--accent); font-variant-numeric: tabular-nums; }
.af-map-go { display: block; margin-top: .3rem; font-weight: 600; color: var(--text-primary); }
.af-map-nd { color: var(--text-muted); }
.af-map-legend { display: flex; align-items: center; gap: .5rem; margin-top: .6rem; font-size: .72rem; color: var(--text-muted); }
.af-map-legend > i { width: 110px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(242,106,33,.22), rgba(242,106,33,1)); }
.af-map-na { display: inline-flex; align-items: center; gap: .4rem; margin-left: 1rem; }
.af-map-na i { width: 12px; height: 12px; border-radius: 3px; background: rgba(127,127,127,.22); }
.af-map-list { list-style: none; margin: 0; padding: 0; }
.af-map-list li, .af-map-list li > a { display: grid; grid-template-columns: 2rem 1fr auto; align-items: center; gap: .7rem; color: inherit; text-decoration: none; }
.af-map-list li > a { grid-column: 1 / -1; }
.af-map-list li { padding: .62rem .6rem; border-bottom: 1px solid var(--border-color); border-radius: 10px; transition: background-color .2s; }
.af-map-list li:last-child { border-bottom: 0; }
.af-map-list li.on { background: rgba(242,106,33,.12); }
.af-map-rank { font: 500 .7rem ui-monospace, 'SF Mono', Menlo, monospace; color: var(--text-muted); }
.af-map-name { display: flex; align-items: center; gap: .45rem; font-size: .92rem; color: var(--text-primary); }
.af-map-list .is-edition .af-map-name { font-weight: 700; }
.af-map-list em { font: 700 .95rem var(--font-body); font-style: normal; font-variant-numeric: tabular-nums; color: var(--accent); }
.af-map-hint { margin: .9rem 0 0; font-size: .78rem; color: var(--text-muted); }
.af-map-off .af-map-stage { display: none; }
.af-map-off { grid-template-columns: 1fr; }
@media (max-width: 860px) { .af-map { grid-template-columns: 1fr; gap: 1.2rem; } .af-map svg { max-height: 460px; } }

/* ---- charts and map draw themselves when they enter the screen (class set by pulse-africa-map.js) ---- */
.af-anim .af-col-bar i { transform: scaleY(0); transform-origin: bottom; transition: transform .9s cubic-bezier(.16,1,.3,1); transition-delay: calc(var(--k, 0) * 70ms); }
.af-anim .af-col-val, .af-anim .af-col-n { opacity: 0; transition: opacity .5s ease; transition-delay: calc(.35s + var(--k, 0) * 70ms); }
.af-anim .af-chart.is-in .af-col-bar i { transform: none; }
.af-anim .af-chart.is-in .af-col-val, .af-anim .af-chart.is-in .af-col-n { opacity: 1; }
.af-anim .af-hbar-track b { transform: scaleX(0); transform-origin: left; transition: transform .9s cubic-bezier(.16,1,.3,1); transition-delay: calc(var(--k, 0) * 60ms); }
.af-anim .af-hbars em { opacity: 0; transition: opacity .5s ease; transition-delay: calc(.3s + var(--k, 0) * 60ms); }
.af-anim .af-hbars.is-in .af-hbar-track b { transform: none; }
.af-anim .af-hbars.is-in em { opacity: 1; }
.af-anim .af-map .af-map-c { opacity: 0; transition: opacity .6s ease, fill .2s, stroke .2s; transition-delay: calc(var(--k, 0) * 18ms), 0s, 0s; }
.af-anim .af-map.is-in .af-map-c { opacity: 1; }
.af-anim .af-map-list li { opacity: 0; transform: translateX(10px); transition: opacity .5s ease, transform .6s cubic-bezier(.16,1,.3,1), background-color .2s; transition-delay: calc(.2s + var(--k, 0) * 60ms), calc(.2s + var(--k, 0) * 60ms), 0s; }
.af-anim .af-map.is-in .af-map-list li { opacity: 1; transform: none; }

/* ---- map period switch ---- */
.af-map-periods { display: inline-flex; gap: .3rem; margin: 0 0 1rem; padding: .25rem; border: 1px solid var(--border-color); border-radius: 999px; background: var(--bg-card); }
.af-map-periods[hidden] { display: none; }
.af-map-periods button { border: 0; border-radius: 999px; padding: .45rem 1rem; background: none; color: var(--text-secondary); font: 600 .78rem var(--font-heading); cursor: pointer; transition: background-color .2s, color .2s; }
.af-map-periods button.on { background: #F26A21; color: #fff; }

/* ---- hero search with suggestions ---- */
.af-search { position: relative; margin: 1.3rem 0 0; }
.af-search-pop { position: absolute; left: 0; right: 0; top: calc(100% + .5rem); z-index: 20; max-height: min(52vh, 420px); overflow: auto; padding: .5rem; border-radius: 14px; border: 1px solid rgba(255,255,255,.14); background: rgba(12,13,17,.96); backdrop-filter: blur(16px); box-shadow: 0 24px 50px -20px rgba(0,0,0,.8); }
.af-search-pop[hidden] { display: none; }
.af-search-group h4 { margin: .5rem .6rem .3rem; font: 700 .62rem var(--font-heading); letter-spacing: .16em; text-transform: uppercase; color: rgba(245,245,245,.45); }
.af-search-pop a { display: grid; grid-template-columns: 1.4rem 1fr auto; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 9px; border: 0 !important; color: #fff; text-decoration: none; font-size: .88rem; }
.af-search-pop a:hover, .af-search-pop a:focus-visible { background: rgba(242,106,33,.18); }
.af-search-pop a b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-search-pop a small { font-size: .74rem; color: rgba(245,245,245,.5); white-space: nowrap; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }
.af-search-none { margin: .6rem; font-size: .84rem; color: rgba(245,245,245,.55); }

/* ---- unicorn cards ---- */
.af-unis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8rem; }
.af-unicard { position: relative; display: flex; flex-direction: column; gap: .25rem; padding: 1rem 1rem 1.1rem; border-radius: 16px; border: 1px solid var(--border-color); background: linear-gradient(160deg, rgba(242,106,33,.1), rgba(242,106,33,0) 60%); color: inherit; text-decoration: none; transition: transform .25s, border-color .25s; }
.af-unicard:hover { transform: translateY(-3px); border-color: #F26A21; text-decoration: none; }
.af-unicard-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.af-unicard-top > i { color: #F26A21; font-size: .8rem; }
.af-unicard b { font: 700 1rem var(--font-heading); color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-unicard small { display: flex; align-items: center; gap: .35rem; font-size: .78rem; color: var(--text-secondary); }
.af-unicard em { margin-top: .6rem; font: 700 1.5rem/1 var(--font-body); font-style: normal; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: #F26A21; }
.af-unicard-l { font: 600 .6rem var(--font-heading); letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
@media (max-width: 1000px) { .af-unis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .af-unis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- funding per year inside the country cards ---- */
.af-spark { margin: 0 0 1.2rem; }
.af-spark > span { display: block; margin-bottom: .45rem; font: 600 .6rem var(--font-heading); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.af-spark > div { display: flex; align-items: flex-end; gap: 4px; height: 44px; max-width: 260px; }
.af-spark i { flex: 1; border-radius: 3px 3px 1px 1px; background: #FF9A4D; opacity: .85; }
.af-country-gh .af-spark i { background: #FCD116; }
.af-search { z-index: 30; }
.af-search-pop a, .af-search-pop a b, .af-search-pop a small { font-family: var(--font-body); text-transform: none; letter-spacing: 0; }
.af-search-pop a b { color: #fff; font-size: .9rem; }
.af-map-pin { stroke: var(--text-primary); }
/* Kenya card */
.af-country-ke:hover { box-shadow: 0 30px 60px -25px rgba(31,163,92,.5); }
.af-country-ke .af-country-cta { color: #7BE0AE; }
.af-country-ke .af-spark i { background: #1FA35C; }
/* Egypt and South Africa cards */
.af-country-eg:hover { box-shadow: 0 30px 60px -25px rgba(201,162,39,.5); }
.af-country-eg .af-country-cta { color: #E9CF7A; }
.af-country-eg .af-spark i { background: #C9A227; }
.af-country-za:hover { box-shadow: 0 30px 60px -25px rgba(64,110,255,.5); }
.af-country-za .af-country-cta { color: #9DB4FF; }
.af-country-za .af-spark i { background: #406EFF; }
/* Côte d'Ivoire card */
.af-country-ci:hover { box-shadow: 0 30px 60px -25px rgba(247,127,0,.5); }
.af-country-ci .af-country-cta { color: #FFC680; }
.af-country-ci .af-spark i { background: #F77F00; }
/* Senegal card */
.af-country-sn:hover { box-shadow: 0 30px 60px -25px rgba(0,166,81,.5); }
.af-country-sn .af-country-cta { color: #7EE0A6; }
.af-country-sn .af-spark i { background: #00A651; }
/* Rwanda card */
.af-country-rw:hover { box-shadow: 0 30px 60px -25px rgba(30,155,224,.5); }
.af-country-rw .af-country-cta { color: #8CD8FF; }
.af-country-rw .af-spark i { background: #1E9BE0; }
/* Nigeria card */
.af-country-ng:hover { box-shadow: 0 30px 60px -25px rgba(15,159,143,.5); }
.af-country-ng .af-country-cta { color: #7EEBDD; }
.af-country-ng .af-spark i { background: #0F9F8F; }
/* Tunisia card */
.af-country-tn:hover { box-shadow: 0 30px 60px -25px rgba(224,49,75,.5); }
.af-country-tn .af-country-cta { color: #FF9AAA; }
.af-country-tn .af-spark i { background: #E0314B; }
.af-country:not(:has(.af-country-bg)) { background: linear-gradient(160deg, #10221a, #0b0d12); }
