/* v0.10.8 contribution page */
.contribution-page {
    padding: 28px 0 56px;
}

.contribution-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: stretch;
    margin: 18px 0;
}

.contribution-hero h1 {
    margin: 14px 0 10px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: .98;
    color: #0f2a4f;
}

.contribution-hero p {
    max-width: 850px;
    color: #526985;
    font-size: 19px;
    line-height: 1.55;
}

.contribution-score {
    display: grid;
    gap: 8px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(15,42,79,.08);
}

.contribution-score span,
.contribution-score small,
.contribution-score em {
    color: #526985;
}

.contribution-score b {
    color: #0f2a4f;
    font-size: 54px;
    line-height: 1;
}

.contribution-score small {
    font-size: 18px;
    font-weight: 900;
    color: #1d4ed8;
}

.contribution-score em {
    font-style: normal;
    line-height: 1.35;
}

.contribution-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.contribution-stats div {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    text-align: center;
}

.contribution-stats b {
    display: block;
    color: #0f2a4f;
    font-size: 28px;
}

.contribution-stats span {
    color: #526985;
    line-height: 1.3;
}

.next-achievement-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    align-items: center;
    margin: 16px 0;
    padding: 16px;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: #fff;
}

.next-achievement-card h2 {
    margin: 4px 0 6px;
}

.next-achievement-card p {
    margin: 0 0 10px;
    color: #526985;
}

.achievement-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: #eef5ff;
    overflow: hidden;
    color: #2563eb;
}

.achievement-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.achievement-icon span {
    font-size: 28px;
}

.progress {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7eef8;
}

.progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #2563eb;
}

.contribution-missions {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin: 22px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.contribution-missions h2 {
    margin: 0 0 6px;
}

.contribution-missions p {
    margin: 0;
    color: #526985;
    line-height: 1.45;
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.mission-grid a {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid #d7e4f4;
    border-radius: 12px;
    background: #f8fbff;
    color: #0f2a4f;
    text-decoration: none;
}

.mission-grid span {
    color: #526985;
    line-height: 1.35;
}

.mission-grid em {
    position: absolute;
    right: 10px;
    top: 10px;
    font-style: normal;
    color: #16a34a;
    font-weight: 900;
}

.achievement-category {
    margin: 22px 0;
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.achievement-card {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    opacity: .50;
}

.achievement-card.unlocked {
    opacity: 1;
    border-color: #bbf7d0;
    background: #fbfffd;
}

.achievement-title {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.achievement-title b {
    color: #0f2a4f;
}

.achievement-title span {
    color: #1d4ed8;
    font-weight: 900;
    white-space: nowrap;
}

.achievement-body p,
.achievement-body small {
    color: #526985;
    line-height: 1.35;
}

.achievement-body p {
    margin: 6px 0;
}

.achievement-body small {
    display: block;
    margin-bottom: 8px;
}

.event-list {
    display: grid;
    gap: 8px;
}

.event-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fbff;
}

.event-row span {
    color: #526985;
}

.event-row em {
    font-style: normal;
    font-weight: 900;
    color: #16a34a;
}

@media (max-width: 900px) {
    .contribution-hero,
    .contribution-missions {
        grid-template-columns: 1fr;
    }

    .contribution-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mission-grid,
    .achievement-grid {
        grid-template-columns: 1fr;
    }

    .contribution-hero h1 {
        font-size: 42px;
    }
}

@media (max-width: 420px) {
    .contribution-stats {
        grid-template-columns: 1fr;
    }

    .achievement-card,
    .next-achievement-card {
        grid-template-columns: 52px 1fr;
    }

    .achievement-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    .event-row {
        grid-template-columns: 1fr;
    }
}

/* v0.12.2 contribution event details */
.event-row > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.event-row small {
    color: #52657f;
    font-weight: 700;
    line-height: 1.35;
}

.event-row small a {
    color: inherit;
    text-decoration: none;
}

.event-row small a:hover {
    color: #2563eb;
    text-decoration: underline;
}

@media (max-width: 680px) {
    .event-row {
        grid-template-columns: 1fr auto;
        align-items: start;
    }

    .event-row span {
        grid-column: 1 / -1;
        order: 3;
    }

    .event-row em {
        justify-self: end;
    }
}
