/* =====================================================================
   MWANGA WA ELIMU — COMMITMENTS BY ROLE (desktop, ≥1024px)
   Everything is scoped under .mwe-roles, so it will not leak into the
   theme. Colours are the custom properties below.

   Images: one square photo per actor, set in each panel's
   .mwe-reactor__photo <img>. A missing or broken image falls back to a
   labelled placeholder automatically.
   ===================================================================== */
.mwe-roles {
    --mwe-navy: #123262;
    --mwe-teal: #79D0CF;
    --mwe-ink: #374F7B;
    --mwe-blue: #2B5A93;
    --mwe-soft: #E3EEFF;
    --mwe-line: #DCE8F5;
    --mwe-gold: #F6E69C;
    --mwe-white: #FFFFFF;

    position: relative;
    overflow: hidden;
    padding: 0;
    background: transparent;
    color: var(--mwe-navy);
    -webkit-font-smoothing: antialiased;
}

/* Force Poppins on every element, including buttons, which browsers
   otherwise render in the system font. */
.mwe-roles *,
.mwe-roles *::before,
.mwe-roles *::after {
    box-sizing: border-box;
}

/* Faint constellation in the corners */

.mwe-roles__inner {
    position: relative;
    /* max-width: 1180px;
    margin: 0 auto; */
}

/* ---------- Heading ---------- */
.mwe-roles__head {
    max-width: 920px;
    margin: 0 auto 48px;
    text-align: center;
}

.mwe-roles__h2 {
    margin: 16px 0 14px;
    font-size: 48px;
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: -.01em;
    color: #036;
}

.mwe-roles__sub {
    max-width: 620px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.6;
    color: var(--mwe-ink);
}

/* ---------- Tab bar ---------- */
.mwe-roles__tabs {
    display: flex;
    gap: 6px;
    width: max-content;
    max-width: 100%;
    margin: 0 auto 40px;
    padding: 6px;
    border: 1px solid var(--mwe-line);
    border-radius: 4px;
    background: var(--mwe-soft);
}

.mwe-roles__tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px 8px 8px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--mwe-navy);
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background .25s, color .25s, box-shadow .25s;
}

.mwe-roles__tab:hover {
    background: rgba(18, 50, 98, .06);
}

.mwe-roles__tab:focus-visible {
    outline: 2px solid var(--mwe-teal);
    outline-offset: 2px;
}

.mwe-roles__tab[aria-selected="true"] {
    background: var(--mwe-navy);
    color: var(--mwe-white);
    box-shadow: 0 8px 20px rgba(18, 50, 98, .18);
}

.mwe-roles__chip {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--mwe-white);
    transition: background .25s;
}

.mwe-roles__chip svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--mwe-navy);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke .25s;
}

.mwe-roles__tab[aria-selected="true"] .mwe-roles__chip {
    background: rgba(121, 208, 207, .18);
}

.mwe-roles__tab[aria-selected="true"] .mwe-roles__chip svg {
    stroke: var(--mwe-teal);
}

/* ---------- Panel ---------- */
.mwe-roles__panel {
    display: grid;
    grid-template-columns: 400px minmax(0, 1fr);
    gap: 72px;
    padding: 56px 64px;
    border: 1px solid var(--mwe-line);
    border-radius: 32px;
    background: var(--mwe-soft);
}

.mwe-roles__panel[hidden] {
    display: none;
}

.mwe-roles__panel:focus-visible {
    outline: 2px solid var(--mwe-teal);
    outline-offset: 4px;
}

.mwe-roles__panel.is-entering {
    animation: mwe-panel-in .45s cubic-bezier(.2, .7, .2, 1);
}

@keyframes mwe-panel-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.mwe-roles__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.mwe-roles__count {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--mwe-blue);
}

.mwe-roles__panel .mwe-roles__meta .mwe-roles__title {
    margin: 8px 0 12px;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 600;
    color: #003366;
}

.mwe-roles__intro {
    margin: 0 0 28px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--mwe-ink);
}

.mwe-roles__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 4px;
    background: var(--mwe-navy);
    color: var(--mwe-white);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}

.mwe-roles__cta span {
    color: var(--mwe-teal);
    transition: transform .2s;
}

.mwe-roles__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(18, 50, 98, .22);
    background-color: var(--mwe-soft);
}

.mwe-roles__cta:hover span {
    transform: translateX(4px);
}

.mwe-roles__cta:focus-visible {
    outline: 2px solid var(--mwe-teal);
    outline-offset: 3px;
}

/* ---------- Commitments list ---------- */
.mwe-roles__lead {
    margin: 0;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--mwe-line);
    font-size: 15px;
    font-weight: 500;
    color: var(--mwe-blue);
}

.mwe-roles ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mwe-roles__item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 20px;
    padding: 28px 0;
    border-bottom: 1px solid var(--mwe-line);
}

.mwe-roles__item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.mwe-roles__num {
    position: relative;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 1.5px dashed var(--mwe-navy);
    border-radius: 50%;
    font-size: 15px;
    font-weight: 600;
}

.mwe-roles__num::after {
    content: "";
    position: absolute;
    top: -3px;
    right: 2px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--mwe-teal);
}

.mwe-roles__item h4 {
    margin: 4px 0 6px;
    font-size: 20px !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
    color: #003366;
}

.mwe-roles__item p {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: var(--mwe-ink);
}

/* =====================================================================
   SPINNING REACTOR + ACTOR PHOTO
   SVG rings spin around a circular photo. Speeds: 60s / 38s / 14s.
   ===================================================================== */
.mwe-reactor {
    position: relative;
    width: 300px;
    aspect-ratio: 1;
    margin-bottom: 28px;
}

.mwe-reactor::before {
    /* soft glow lifts it off the panel */
    content: "";
    position: absolute;
    inset: 6%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(121, 208, 207, .35) 0%, rgba(121, 208, 207, .08) 55%, transparent 72%);
}

.mwe-reactor__rings {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.mwe-r {
    fill: none;
    stroke: var(--mwe-navy);
}

.mwe-r--frame {
    stroke-opacity: .25;
    stroke-width: 1.5;
}

.mwe-r--dots {
    stroke-opacity: .55;
    stroke-width: 1.5;
    stroke-dasharray: 2 9;
}

.mwe-r--segs {
    stroke-opacity: .85;
    stroke-width: 3;
    stroke-dasharray: 190 40 60 40 120 40;
}

.mwe-r--ticks {
    stroke-opacity: .35;
    stroke-width: 10;
    stroke-dasharray: 1 7;
}

.mwe-r--track {
    stroke-opacity: .1;
    stroke-width: 10;
}

.mwe-r--sweep {
    stroke: var(--mwe-teal);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 260 600;
}

.mwe-sat {
    fill: var(--mwe-teal);
    stroke: var(--mwe-white);
    stroke-width: 3;
}

.mwe-cross {
    fill: none;
    stroke: var(--mwe-navy);
    stroke-opacity: .5;
    stroke-width: 2;
    stroke-linecap: round;
}

.mwe-cross--soft {
    stroke-opacity: .25;
    stroke-width: 1.5;
}

.mwe-spin,
.mwe-spin-rev,
.mwe-spin-fast {
    transform-box: view-box;
    transform-origin: 50% 50%;
}

.mwe-spin {
    animation: mwe-spin 60s linear infinite;
}

.mwe-spin-rev {
    animation: mwe-spin 38s linear infinite reverse;
}

.mwe-spin-fast {
    animation: mwe-spin 14s linear infinite;
}

@keyframes mwe-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Photo: a circle inside the track ring (r=128 of 400 → 64%) */
.mwe-reactor__photo {
    position: absolute;
    inset: 18%;
    overflow: hidden;
    border-radius: 50%;
    border: 4px solid var(--mwe-white);
    background: var(--mwe-navy);
    box-shadow: 0 14px 30px rgba(18, 50, 98, .2);
}

.mwe-reactor__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Placeholder, shown when the image is missing */
.mwe-reactor__photo.is-empty {
    display: grid;
    place-items: center;
    padding: 0 22px;
    text-align: center;
    background: repeating-linear-gradient(135deg, #E3EEF9 0 10px, #EDF4FB 10px 20px);
}

.mwe-reactor__photo.is-empty img {
    display: none;
}

.mwe-reactor__photo.is-empty::after {
    content: "Image · " attr(data-label);
    font-size: 12px;
    line-height: 1.45;
    font-weight: 500;
    color: var(--mwe-blue);
}

/* Photo eases in when its tab opens */
.is-entering .mwe-reactor__photo {
    animation: mwe-photo-in .6s cubic-bezier(.2, .7, .2, 1);
}

@keyframes mwe-photo-in {
    from {
        opacity: 0;
        transform: scale(.9);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* Sweep does a quick lap when the tab changes */
.is-entering .mwe-spin-fast {
    animation: mwe-spin 1.2s cubic-bezier(.3, .8, .3, 1) 1, mwe-spin 14s linear 1.2s infinite;
}

/* =====================================================================
   ACCORDION (below 1024px)
   The script adds one .mwe-roles__acc header button before each panel.
   They are hidden on desktop, where the tab bar is used instead.
   ===================================================================== */
.mwe-roles__acc {
    display: none;
}

@media (max-width: 1023px) {
    /* .mwe-roles {
        padding: 64px 20px 72px;
    } */

    .mwe-roles__head {
        margin-bottom: 32px;
    }

    .mwe-roles__h2 {
        font-size: 32px;
    }

    .mwe-roles__sub {
        font-size: 16px;
    }

    .mwe-roles__tabs {
        display: none;
    }

    /* Accordion header */
    .mwe-roles__acc {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        margin: 10px 0 0;
        padding: 10px 16px 10px 10px;
        border: 1px solid var(--mwe-line);
        border-radius: 12px;
        background: var(--mwe-soft);
        color: var(--mwe-navy);
        font-family: inherit;
        font-size: 16px;
        font-weight: 500;
        line-height: 1.3;
        text-align: left;
        cursor: pointer;
        scroll-margin-top: 16px;
        -webkit-tap-highlight-color: transparent;
        transition: background .25s, color .25s, border-color .25s;
    }

    .mwe-roles__acc:first-of-type {
        margin-top: 0;
    }

    .mwe-roles__acc:focus-visible {
        outline: 2px solid var(--mwe-teal);
        outline-offset: 2px;
    }

    .mwe-roles__acc .mwe-roles__chip {
        flex: none;
    }

    .mwe-roles__chev {
        flex: none;
        width: 20px;
        height: 20px;
        margin-left: auto;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.2;
        stroke-linecap: round;
        stroke-linejoin: round;
        transition: transform .25s;
    }

    .mwe-roles__acc[aria-expanded="true"] {
        border-color: var(--mwe-navy);
        border-radius: 12px 12px 0 0;
        background: var(--mwe-navy);
        color: var(--mwe-white);
    }

    .mwe-roles__acc[aria-expanded="true"] .mwe-roles__chip {
        background: rgba(121, 208, 207, .18);
    }

    .mwe-roles__acc[aria-expanded="true"] .mwe-roles__chip svg {
        stroke: var(--mwe-teal);
    }

    .mwe-roles__acc[aria-expanded="true"] .mwe-roles__chev {
        transform: rotate(180deg);
    }

    /* Panel sits directly under its header, single column */
    .mwe-roles__panel {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
        padding: 28px 20px 32px;
        border-top: 0;
        border-radius: 0 0 12px 12px;
    }

    .mwe-roles__panel.is-collapsed {
        display: none;
    }

    .mwe-reactor {
        /* width: min(240px, 100%);
        margin-left: auto;
        margin-right: auto; */
        display: none;
    }

    .mwe-roles__item {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 14px;
        padding: 20px 0;
    }

    .mwe-roles__num {
        width: 44px;
        height: 44px;
        font-size: 14px;
    }

    .mwe-roles__item h4 {
        margin-top: 2px;
        font-size: 18px !important;
    }
}

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

    .mwe-roles *,
    .mwe-roles *::before,
    .mwe-roles *::after {
        animation: none !important;
        transition: none !important;
    }
}