:root {
    color: #172033;
    background: #f4f6fa;
    font-family: "PT Sans", Arial, sans-serif;
}

body {
    min-height: 100vh;
    margin: 0;
}

.overall-grade {
    width: min(1050px, calc(100% - 28px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.overall-grade__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
}

.overall-grade__nav div {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.overall-grade__nav a,
.overall-grade__notice a {
    color: #3157a4;
    text-decoration: none;
}

.overall-grade__nav a:hover,
.overall-grade__notice a:hover {
    text-decoration: underline;
}

.overall-grade__header {
    margin: 34px 0 24px;
}

.overall-grade__header > p {
    margin: 0 0 8px;
    color: #63708a;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.overall-grade__header h1 {
    margin: 0;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.08;
}

.overall-grade__formula {
    width: fit-content;
    margin-top: 18px;
    padding: 12px 16px;
    border: 1px solid #d9dfeb;
    border-radius: 10px;
    background: #fff;
    font-size: clamp(17px, 2.6vw, 22px);
    font-weight: 700;
}

.overall-grade__formula sub,
.overall-grade-table th sub {
    position: relative;
    bottom: -0.3em;
    font-size: 0.68em;
    line-height: 0;
    vertical-align: baseline;
}

.overall-grade__table-wrap {
    overflow-x: auto;
    border: 1px solid #d9dfeb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 28px rgb(29 45 80 / 8%);
}

.overall-grade-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
}

.overall-grade-table th,
.overall-grade-table td {
    padding: 10px 13px;
    border-right: 1px solid #e2e6ef;
    border-bottom: 1px solid #e2e6ef;
    text-align: center;
    white-space: nowrap;
}

.overall-grade-table th:last-child,
.overall-grade-table td:last-child {
    border-right: 0;
}

.overall-grade-table tbody tr:last-child td {
    border-bottom: 0;
}

.overall-grade-table thead th {
    background: #e9eef8;
    color: #26344f;
    font-weight: 700;
}

.overall-grade-table tbody tr:nth-child(even) td {
    background: #f8f9fc;
}

.overall-grade-table .participant-column {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 235px;
    text-align: left;
    background: #fff;
}

.overall-grade-table thead .participant-column {
    z-index: 2;
    background: #e9eef8;
}

.overall-grade-table tbody tr:nth-child(even) .participant-column {
    background: #f8f9fc;
}

.overall-grade-table .rank {
    color: #61708a;
    font-weight: 700;
}

.overall-grade-table .total-grade,
.overall-grade-table .mark-grade {
    background: #e5f5e9;
    font-weight: 700;
}

.overall-grade-table .mark-grade {
    font-size: 1.08em;
}

.overall-grade-table tbody tr:nth-child(even) .total-grade,
.overall-grade-table tbody tr:nth-child(even) .mark-grade {
    background: #dbedde;
}

.overall-grade__empty,
.overall-grade__notice {
    padding: 28px;
    border: 1px solid #d9dfeb;
    border-radius: 14px;
    background: #fff;
    color: #526078;
    font-size: 18px;
}

.overall-grade--denied {
    display: grid;
    min-height: calc(100vh - 88px);
    place-items: center;
}

.overall-grade__notice {
    width: min(520px, 100%);
    box-sizing: border-box;
}

.overall-grade__notice h1 {
    margin: 0 0 12px;
    color: #172033;
}

.overall-grade__notice p {
    margin: 0 0 20px;
}

@media (max-width: 620px) {
    .overall-grade {
        width: min(100% - 16px, 1050px);
        padding-top: 22px;
    }

    .overall-grade__header {
        margin-top: 26px;
    }

    .overall-grade-table th,
    .overall-grade-table td {
        padding: 8px 10px;
    }
}
