/* Member status: rings, window, certificate */
:root { --lv-ring-gap: #141416; --lv1: #CD7F32; --lv2: #C9CED6; --lv3: #F4B000; }
[data-theme="light"] { --lv-ring-gap: #ffffff; --lv1: #B8692A; --lv2: #9AA3AF; --lv3: #D99A00; }
.em-lv { border-radius: 50%; }
.em-lv-1 { box-shadow: 0 0 0 2px var(--lv-ring-gap), 0 0 0 4px var(--lv1) !important; }
.em-lv-2 { box-shadow: 0 0 0 2px var(--lv-ring-gap), 0 0 0 4px var(--lv2) !important; }
.em-lv-3 { box-shadow: 0 0 0 2px var(--lv-ring-gap), 0 0 0 4px var(--lv3), 0 0 14px rgba(244,176,0,.35) !important; }
/* Ambassador: the colours of Africa's flags, green, gold and blue */
.em-lv-4 { box-shadow: 0 0 0 2px var(--lv-ring-gap), 0 0 0 3.5px #009E60, 0 0 0 5px #FCD116, 0 0 0 6.5px #3A75C4 !important; }
.pf-av.em-lv-1, .pf-av.em-lv-2, .pf-av.em-lv-3 { box-shadow: 0 0 0 4px var(--lv-ring-gap), 0 0 0 8px var(--lvc, var(--lv1)) !important; }
.pf-av.em-lv-2 { --lvc: var(--lv2); } .pf-av.em-lv-3 { --lvc: var(--lv3); }
.pf-av.em-lv-4 { box-shadow: 0 0 0 4px var(--lv-ring-gap), 0 0 0 7px #009E60, 0 0 0 10px #FCD116, 0 0 0 13px #3A75C4 !important; }

/* profile chips and my status button */
:is(#em-x, .pf-st).pf-st { cursor: pointer; height: auto !important; min-height: 0 !important; font: inherit; display: inline-flex; align-items: center; gap: 4px; border: 1px solid transparent; }
.pf-st.lv-1 { color: #E7A266 !important; background: rgba(205,127,50,.14) !important; border-color: rgba(205,127,50,.35) !important; }
.pf-st.lv-2 { color: #E2E6EC !important; background: rgba(201,206,214,.12) !important; border-color: rgba(201,206,214,.35) !important; }
.pf-st.lv-3 { color: #F8C94A !important; background: rgba(244,176,0,.14) !important; border-color: rgba(244,176,0,.4) !important; }
.pf-st.lv-4 { color: #fff !important; background: linear-gradient(90deg, rgba(0,158,96,.35), rgba(252,209,22,.3), rgba(58,117,196,.35)) !important; border-color: rgba(252,209,22,.4) !important; }
[data-theme="light"] .pf-st.lv-2 { color: #4b5563 !important; } [data-theme="light"] .pf-st.lv-1 { color: #9a5418 !important; } [data-theme="light"] .pf-st.lv-3 { color: #8a6100 !important; } [data-theme="light"] .pf-st.lv-4 { color: #1f2937 !important; }
.pf-st-found { color: #F8C94A !important; background: transparent !important; border: 1px dashed rgba(244,176,0,.5) !important; }
:is(#em-x, .pf-mystatus).pf-mystatus { display: flex !important; align-items: center; gap: 12px; width: 100%; height: auto !important; min-height: 0 !important; margin: 12px 0 0; padding: 12px 14px !important; border-radius: 14px !important; text-align: left; cursor: pointer; font: inherit;
  background: rgba(127,127,127,.08) !important; border: 1px solid rgba(127,127,127,.2) !important; color: var(--text, #fff) !important; }
.pf-mystatus > svg:first-child { flex: none; color: var(--lvc, #9a9aa5); }
.pf-mystatus.lv-1 { --lvc: var(--lv1); } .pf-mystatus.lv-2 { --lvc: var(--lv2); } .pf-mystatus.lv-3 { --lvc: var(--lv3); } .pf-mystatus.lv-4 { --lvc: #FCD116; }
.pf-mystatus span { flex: 1; min-width: 0; display: flex; flex-direction: column; } .pf-mystatus b { font-size: .92rem; } .pf-mystatus small { font-size: .78rem; color: var(--muted, #9a9aa5); }

/* window */
.ems-ov { position: fixed; inset: 0; z-index: 10090; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(5,3,4,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ems-ov.open { display: flex; }
.ems-box { position: relative; width: 100%; max-width: 640px; max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--card, #1b1b1e); color: var(--text, #fff); border: 1px solid rgba(127,127,127,.2); border-radius: 22px; padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.ems-box.ems-small { max-width: 440px; }
[data-theme="light"] .ems-box { background: #fff; }
:is(#em-x, .ems-x).ems-x { position: absolute; top: 14px; right: 14px; width: 36px !important; height: 36px !important; min-height: 36px !important; padding: 0 !important; border-radius: 50% !important; border: 0 !important; background: rgba(127,127,127,.16) !important; color: inherit !important; cursor: pointer; font-size: 15px; z-index: 2; }
.ems-loading { height: 160px; border-radius: 14px; background: linear-gradient(90deg, rgba(127,127,127,.08), rgba(127,127,127,.18), rgba(127,127,127,.08)); background-size: 200% 100%; animation: emsShim 1.2s infinite; }
@keyframes emsShim { to { background-position: -200% 0; } }
.ems-hero { display: flex; gap: 16px; align-items: center; padding: 18px; margin: 0 0 6px; border-radius: 18px; padding-right: 48px; background: rgba(127,127,127,.08); --c: #9a9aa5; }
.ems-hero.lv-1 { --c: var(--lv1); background: linear-gradient(135deg, rgba(205,127,50,.22), rgba(205,127,50,.04)); }
.ems-hero.lv-2 { --c: var(--lv2); background: linear-gradient(135deg, rgba(201,206,214,.2), rgba(201,206,214,.04)); }
.ems-hero.lv-3 { --c: var(--lv3); background: linear-gradient(135deg, rgba(244,176,0,.25), rgba(244,176,0,.04)); }
.ems-hero.lv-4 { --c: #FCD116; background: linear-gradient(135deg, rgba(0,158,96,.28), rgba(252,209,22,.16), rgba(58,117,196,.28)); }
.ems-medal { flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: var(--c); background: rgba(0,0,0,.25); box-shadow: 0 0 0 3px var(--c) inset; }
.ems-medal svg { width: 30px; height: 30px; }
.ems-hero small { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #9a9aa5); }
.ems-hero h3 { margin: 2px 0 4px; font-family: Jost, Inter, sans-serif; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.8rem); font-weight: 800; color: var(--c); }
.ems-hero p { margin: 0; font-size: .86rem; color: var(--text-2, #d6d6dc); line-height: 1.45; }
[data-theme="light"] .ems-hero p { color: #444; }
.ems-found { font-family: Inter, sans-serif; font-size: .7rem; font-weight: 800; vertical-align: middle; color: #F8C94A; border: 1px dashed rgba(244,176,0,.6); padding: 2px 8px; border-radius: 999px; }
.ems-sec { padding: 16px 2px; border-top: 1px solid rgba(127,127,127,.15); }
.ems-sec:first-of-type { border-top: 0; }
.ems-sec h4 { margin: 0 0 10px; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #9a9aa5); }
.ems-next { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; } .ems-next b { font-size: 1rem; } .ems-next span { font-weight: 800; color: var(--red-bright, #FF3A5C); }
.ems-bar { display: block; height: 8px; border-radius: 999px; background: rgba(127,127,127,.18); overflow: hidden; }
.ems-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #C8102E, #FF3A5C); transition: width .6s; }
.ems-steps { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ems-steps li { display: flex; gap: 11px; align-items: flex-start; }
.ems-tick { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(127,127,127,.4); display: grid; place-items: center; margin-top: 1px; }
.ems-steps li.done .ems-tick { background: #1fa35b; border-color: #1fa35b; color: #fff; } .ems-tick svg { width: 12px; height: 12px; }
.ems-steps li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; } .ems-steps b { font-size: .88rem; font-weight: 700; }
.ems-steps em { font-style: normal; font-size: .76rem; color: var(--muted, #9a9aa5); } .ems-steps .ems-bar { height: 5px; }
.ems-note { margin: 12px 0 0; font-size: .74rem; line-height: 1.45; color: var(--muted, #9a9aa5); }
.ems-perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ems-perks li { display: flex; gap: 9px; align-items: flex-start; font-size: .88rem; line-height: 1.4; } .ems-perks svg { flex: none; width: 15px; height: 15px; color: #2fbf74; margin-top: 2px; }
.ems-cert-sec { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; } .ems-cert-sec > div { flex: 1 1 220px; display: flex; flex-direction: column; gap: 3px; } .ems-cert-sec small { font-size: .78rem; color: var(--muted, #9a9aa5); line-height: 1.4; }
:is(#em-x, .ems-btn).ems-btn { display: inline-flex !important; align-items: center; justify-content: center; gap: 7px; height: auto !important; min-height: 42px !important; padding: 10px 18px !important; border-radius: 999px !important; border: 0 !important; background: linear-gradient(135deg, #C8102E, #FF3A5C) !important; color: #fff !important; font: inherit; font-weight: 750; font-size: .88rem !important; cursor: pointer; }
:is(#em-x, .ems-btn).ems-btn.ghost { background: rgba(127,127,127,.16) !important; color: var(--text, #fff) !important; }
.ems-btn svg { width: 16px; height: 16px; }
.ems-ladder { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr)); gap: 10px; }
.ems-tier { position: relative; padding: 14px 12px; border-radius: 14px; border: 1px solid rgba(127,127,127,.18); background: rgba(127,127,127,.05); display: flex; flex-direction: column; gap: 6px; min-width: 0; --c: #9a9aa5; }
.ems-tier.lv-1 { --c: var(--lv1); } .ems-tier.lv-2 { --c: var(--lv2); } .ems-tier.lv-3 { --c: var(--lv3); } .ems-tier.lv-4 { --c: #FCD116; }
.ems-tier.on { border-color: var(--c); box-shadow: 0 0 0 1px var(--c) inset; background: rgba(127,127,127,.1); }
.ems-tier.past { opacity: .72; }
.ems-tier-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--c); box-shadow: 0 0 0 2px var(--c) inset; } .ems-tier-dot svg { width: 16px; height: 16px; }
.ems-tier b { font-size: .92rem; color: var(--c); } .ems-tier b i { font-style: normal; font-size: .66rem; color: #fff; background: var(--c); padding: 1px 7px; border-radius: 999px; margin-left: 4px; vertical-align: 2px; }
.ems-tier.lv-2 b i { color: #111; } .ems-tier.lv-3 b i, .ems-tier.lv-4 b i { color: #111; }
.ems-tier small { font-size: .74rem; color: var(--muted, #9a9aa5); line-height: 1.4; }
.ems-tier ul { margin: 2px 0 0; padding-left: 15px; font-size: .74rem; line-height: 1.45; color: var(--text-2, #d6d6dc); display: flex; flex-direction: column; gap: 3px; }
[data-theme="light"] .ems-tier ul { color: #444; }
.ems-feat-lv.lv-3 { color: #F8C94A !important; font-weight: 700; } .ems-feat-lv.lv-4 { color: #7fe0ad !important; font-weight: 700; }

/* certificate */
.ems-cert-wrap { width: 100%; max-width: 860px; max-height: calc(100dvh - 32px); overflow-y: auto; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.ems-cert { --c: #C9CED6; position: relative; width: 100%; aspect-ratio: 1.414; max-height: 76dvh; container-type: inline-size; background: #fffdf8; color: #1b1418; border-radius: 10px; padding: 5cqw 6cqw; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; text-align: center; justify-content: space-between;
  box-shadow: 0 0 0 1.2cqw #fffdf8 inset, 0 0 0 1.45cqw var(--c) inset, 0 30px 80px rgba(0,0,0,.5); font-family: Inter, system-ui, sans-serif; }
.ems-cert.lv-2 { --c: #9aa3af; } .ems-cert.lv-3 { --c: #c99400; } .ems-cert.lv-4 { --c: #009E60; }
.ems-cert-top { width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: 1.7cqw; color: #6b6168; }
.ems-cert-logo { font-family: Jost, Inter, sans-serif; font-size: 2.8cqw; font-weight: 700; color: #1b1418; } .ems-cert-logo b { color: #C8102E; font-weight: 700; }
.ems-cert-medal { width: 9cqw; height: 9cqw; border-radius: 50%; display: grid; place-items: center; color: var(--c); box-shadow: 0 0 0 .5cqw var(--c) inset; }
.ems-cert-medal svg { width: 55%; height: 55%; }
.ems-cert-kicker { font-size: 1.6cqw; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; color: var(--c); }
.ems-cert h2 { margin: 0; font-family: Jost, Inter, sans-serif; font-size: 5.4cqw; font-weight: 700; line-height: 1.05; color: #1b1418; }
.ems-cert > p { margin: 0; max-width: 78%; font-size: 1.95cqw; line-height: 1.5; color: #3f363b; } .ems-cert > p b { color: var(--c); }
.ems-cert-stats { display: flex; gap: 6cqw; } .ems-cert-stats div, .ems-cert-foot div { display: flex; flex-direction: column; gap: .3cqw; }
.ems-cert-stats b { font-family: Jost, Inter, sans-serif; font-size: 3.6cqw; color: #1b1418; } .ems-cert-stats span, .ems-cert-foot span { font-size: 1.45cqw; color: #6b6168; }
.ems-cert-foot { width: 100%; display: flex; justify-content: space-between; border-top: 1px solid rgba(0,0,0,.12); padding-top: 1.6cqw; } .ems-cert-foot b { font-size: 1.8cqw; color: #1b1418; }
.ems-cert-check { margin: 0; font-size: 1.35cqw !important; color: #8a8086 !important; }
.ems-cert-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
@media print {
  body.ems-printing > *:not(#emsCertOv) { display: none !important; }
  body.ems-printing #emsCertOv { position: static !important; display: block !important; padding: 0 !important; background: #fff !important; backdrop-filter: none !important; }
  body.ems-printing .ems-cert-acts { display: none !important; }
  body.ems-printing .ems-cert-wrap { max-width: none; max-height: none; overflow: visible; }
  body.ems-printing .ems-cert { max-height: none; box-shadow: 0 0 0 1.2cqw #fffdf8 inset, 0 0 0 1.45cqw var(--c) inset; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4 landscape; margin: 10mm; }
}
@media (max-width: 560px) { .ems-box { padding: 16px; border-radius: 18px; } .ems-hero { padding: 14px; gap: 12px; } .ems-medal { width: 48px; height: 48px; } }
.pf-st svg { width: 15px; height: 15px; flex: none; }
.pf-mystatus > svg:first-child { width: 30px; height: 30px; }
:is(#em-x, .pf-st).pf-st { font-size: .7rem !important; padding: 3px 9px !important; line-height: 1.2; }
.pf-st svg { width: 14px; height: 14px; }
.ems-box > .ems-btn { margin-top: 14px; }
