:root {
    --table-red: #c90d23;
    --table-red-dark: #9e0818;
    --table-gold: #f4ba24;
    --table-text: #121212;
    --table-muted: #727272;
    --table-line: #ececef;
    --table-bg: #f5f5f7;
    --table-white: #ffffff;
}

.table-layout {
    padding-top: clamp(34px, 5vw, 72px);
    padding-bottom: clamp(50px, 7vw, 96px);
}

.standings-page {
    width: 100%;
}

.standings-page__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 30px;
}

.standings-page__heading h1 {
    margin: 7px 0 12px;
    color: var(--table-text);
    font-size: clamp(34px, 5vw, 62px);
    line-height: .98;
    letter-spacing: -.045em;
}

.standings-page__heading p {
    max-width: 760px;
    margin: 0;
    color: var(--table-muted);
    font-size: 16px;
    line-height: 1.65;
}

.standings-page__matches {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    color: #fff;
    border-radius: 12px;
    background: var(--table-red);
    font-weight: 800;
    text-decoration: none;
    transition: transform .2s ease, background .2s ease;
}

.standings-page__matches:hover {
    color: #fff;
    background: var(--table-red-dark);
    transform: translateY(-2px);
}

.standings-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.standings-summary__item {
    min-width: 0;
    padding: 20px 22px;
    border: 1px solid #e8e8eb;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(25, 25, 30, .06);
}

.standings-summary__item span {
    display: block;
    margin-bottom: 7px;
    color: var(--table-muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: .055em;
}

.standings-summary__item strong {
    display: block;
    color: var(--table-text);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1;
}

.standings-card {
    overflow: hidden;
    border: 1px solid #e6e6e9;
    border-radius: 24px;
    background: var(--table-white);
    box-shadow: 0 20px 60px rgba(25, 25, 30, .09);
}

.standings-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 28px;
    border-bottom: 1px solid var(--table-line);
    background:
        linear-gradient(135deg, rgba(201, 13, 35, .06), rgba(244, 186, 36, .08));
}

.standings-card__eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--table-red);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.standings-card__top h2 {
    margin: 0;
    color: var(--table-text);
    font-size: clamp(20px, 3vw, 30px);
    line-height: 1.15;
}

.standings-card__source {
    flex: 0 0 auto;
    color: var(--table-red);
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
}

.standings-card__source:hover {
    color: var(--table-red-dark);
}

.standings-scroll {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
}

.standings-table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
    border-spacing: 0;
    color: var(--table-text);
}

.standings-table th,
.standings-table td {
    padding: 15px 12px;
    border-bottom: 1px solid var(--table-line);
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.standings-table thead th {
    color: #77777d;
    background: #fafafa;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.standings-table tbody tr {
    transition: background .18s ease;
}

.standings-table tbody tr:hover {
    background: #fafafa;
}

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

.standings-table tbody tr.is-metallurg {
    background:
        linear-gradient(90deg, rgba(201, 13, 35, .095), rgba(244, 186, 36, .075));
}

.standings-table tbody tr.is-metallurg:hover {
    background:
        linear-gradient(90deg, rgba(201, 13, 35, .14), rgba(244, 186, 36, .11));
}

.standings-table tbody tr.is-metallurg td:first-child {
    box-shadow: inset 5px 0 0 var(--table-red);
}

.standings-table__position {
    width: 66px;
}

.standings-table__team {
    width: 36%;
    min-width: 270px;
    text-align: left !important;
}

.standings-table__points {
    color: var(--table-red);
    font-size: 17px;
    font-weight: 900;
}

.standings-table__goals,
.standings-table__balance {
    font-weight: 750;
}

.standings-position {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #e0e0e4;
    border-radius: 50%;
    background: #fff;
    font-size: 13px;
    font-weight: 900;
}

.is-metallurg .standings-position {
    color: #fff;
    border-color: var(--table-red);
    background: var(--table-red);
}

.standings-team {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.standings-team img,
.standings-team__placeholder {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.standings-team__placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 50%;
    background: var(--table-red);
    font-weight: 900;
}

.standings-team__name {
    display: block;
    min-width: 0;
}

.standings-team__name strong,
.standings-team__name small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.standings-team__name strong {
    color: var(--table-text);
    font-size: 15px;
    line-height: 1.25;
}

.standings-team__name small {
    margin-top: 3px;
    color: var(--table-muted);
    font-size: 12px;
}

.standings-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 28px;
    color: var(--table-muted);
    border-top: 1px solid var(--table-line);
    background: #fafafa;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .standings-page__heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .standings-card__top {
        align-items: flex-start;
        flex-direction: column;
    }

    .standings-card__footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
}

@media (max-width: 560px) {
    .table-layout {
        padding-top: 28px;
        padding-bottom: 54px;
    }

    .standings-page__heading {
        margin-bottom: 22px;
    }

    .standings-page__matches {
        width: 100%;
    }

    .standings-summary {
        gap: 10px;
    }

    .standings-summary__item {
        padding: 16px;
        border-radius: 15px;
    }

    .standings-card {
        margin-right: -14px;
        margin-left: -14px;
        border-right: 0;
        border-left: 0;
        border-radius: 18px;
    }

    .standings-card__top {
        padding: 20px;
    }

    .standings-table th,
    .standings-table td {
        padding: 13px 10px;
    }

    .standings-card__footer {
        padding: 16px 20px;
    }
}
