/* Exam results — toppers by exam */

.result-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 1.25rem 0 1.5rem;
}

.result-tab {
    cursor: pointer;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    font-weight: 600;
    font-size: 0.875rem;
    font-family: inherit;
    border-radius: 999px;
    padding: 11px 20px;
    min-height: 44px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .result-tab:hover {
        transform: translateY(-2px);
        border-color: var(--primary);
    }
}

.result-tab.is-active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(55, 48, 163, 0.22);
}

.result-tab:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.results-section {
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.results-grid {
    margin-top: 0.5rem;
}

.result-card {
    text-align: center;
    padding-top: 28px;
    position: relative;
    overflow: visible;
}

.result-card__rank {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #3730a3, #6366f1);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(67, 56, 202, 0.35);
}

.result-card__photo {
    width: 120px;
    height: 120px;
    margin: 8px auto 16px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #e0e7ff;
    box-shadow: 0 8px 24px rgba(67, 56, 202, 0.18);
    background: linear-gradient(135deg, #eef2ff, #fff);
}

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

.result-card__initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #4338ca, #6366f1);
}

.result-card h3 {
    margin: 0 0 6px;
    font-size: 1.1rem;
    color: var(--text);
}

.result-card__meta {
    margin: 0;
    font-size: 0.88rem;
    color: var(--muted);
}

.result-card__year {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
}

.result-panels {
    margin-top: 0.25rem;
}

.result-panel[hidden] {
    display: none !important;
}

.result-panel:not([hidden]) {
    animation: panelFade 0.35s ease;
}

@media (max-width: 768px) {
    .result-card__photo {
        width: 100px;
        height: 100px;
    }
}
