.festival-results {
    --festival-navy: #003366;
    --festival-navy-dark: #00264d;
    --festival-blue: #005da9;
    --festival-gold: #fdb913;

    --festival-border: #d9dee3;
    --festival-light: #f5f7f9;
    --festival-text: #212529;
    --festival-muted: #66717c;

    max-width: 1400px;
    margin: 0 auto 6rem;
    color: var(--festival-text);
}


/* Header */

.festival-results__header {
    max-width: 850px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.festival-results__eyebrow {
    margin: 0 0 .4rem;
    color: var(--festival-blue);
    font-size: .875rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.festival-results__header h2 {
    margin: 0 0 .75rem;
    color: var(--festival-navy);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
}

.festival-results__intro {
    margin: 0;
    color: var(--festival-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}


/* Podium / Top Three */

.festival-podium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: end;
    gap: 1.25rem;
    max-width: 1100px;
    margin: 0 auto 4rem;
}

.festival-podium__card {
    position: relative;
    overflow: hidden;
    padding: 2rem 1.5rem;
    border: 1px solid var(--festival-border);
    border-radius: .75rem;
    background: #fff;
    text-align: center;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .08);
}

.festival-podium__card--first {
    min-height: 320px;
    padding-top: 2.5rem;
    border-top: 6px solid var(--festival-gold);
}

.festival-podium__card--second {
    min-height: 275px;
    border-top: 6px solid #a7adb4;
}

.festival-podium__card--third {
    min-height: 250px;
    border-top: 6px solid #a66a3f;
}


/* Large place number */

.festival-podium__place {
    display: flex;
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: var(--festival-navy);
    color: #fff;

    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.festival-podium__card--first .festival-podium__place {
    width: 84px;
    height: 84px;
    background: var(--festival-gold);
    color: var(--festival-navy-dark);
    font-size: 2.4rem;
}


.festival-podium__card--second .festival-podium__place {
    background: #c9cdd1;
    color: var(--festival-navy-dark);
}

.festival-podium__card--third .festival-podium__place {
    background: #c98c63;
    color: #212529;
}



.festival-podium__label {
    margin: 0 0 .4rem;
    color: var(--festival-muted);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.festival-podium__card h3 {
    margin: 0;
    color: var(--festival-navy);
    font-size: 1.65rem;
}

.festival-podium__card--first h3 {
    font-size: 2rem;
}

.festival-podium__class {
    margin: .35rem 0 1.25rem;
    color: var(--festival-muted);
}

.festival-podium__score {
    display: inline-flex;
    align-items: center;
    gap: .65rem;

    padding: .45rem .8rem;
    border-radius: 100px;
    background: var(--festival-light);

    font-size: .875rem;
}

.festival-podium__score strong {
    color: var(--festival-navy);
    font-size: 1.15rem;
}


/* Section Heading */

.festival-section-heading {
    margin-bottom: 1.5rem;
}

.festival-section-heading h3 {
    margin: 0 0 .35rem;
    color: var(--festival-navy);
    font-size: 1.75rem;
}

.festival-section-heading p {
    max-width: 800px;
    margin: 0;
    color: var(--festival-muted);
    line-height: 1.6;
}


/* Tables */

.festival-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.festival-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    background: #fff;
}

.festival-table th,
.festival-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--festival-border);
    vertical-align: middle;
}

.festival-table thead th {
    background: var(--festival-navy);
    color: #fff;
    font-size: .875rem;
    font-weight: 700;
    text-align: center;
}

.festival-table thead th:nth-child(2) {
    text-align: left;
}

.festival-table tbody th {
    color: var(--festival-navy);
    font-weight: 700;
    text-align: left;
}

.festival-table tbody td {
    text-align: center;
}

.festival-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.festival-table tbody tr:hover {
    background: #eef5fa;
}


/* Placement circles */

.festival-place {
    display: inline-flex;
    width: 38px;
    height: 38px;

    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: #e9ecef;
    color: var(--festival-navy);

    font-weight: 800;
}

.festival-place--first {
    background: var(--festival-gold);
}

.festival-place--second {
    background: #c9cdd1;
}

.festival-place--third {
    background: #c98c63;
    color: #212529;
}

.festival-tiebreak {
    color: var(--festival-blue);
    font-weight: 700;
}

.festival-table-note {
    margin: .75rem 0 3rem;
    color: var(--festival-muted);
    font-size: .875rem;
}


/* Detailed Scores */

.festival-details {
    margin-top: 2rem;
    border: 1px solid var(--festival-border);
    border-radius: .6rem;
    background: #fff;
}

.festival-details summary {
    position: relative;
    padding: 1.25rem 3.5rem 1.25rem 1.5rem;
    color: var(--festival-navy);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    list-style: none;
}

.festival-details summary::-webkit-details-marker {
    display: none;
}

.festival-details summary::after {
    content: "\002B";

    position: absolute;
    top: 50%;
    right: 1.5rem;

    transform: translateY(-50%);

    color: var(--festival-blue);
    font-size: 1.75rem;
    font-weight: 400;
}

.festival-details details[open] summary::after {
    content: "\2212";
}

.festival-details details[open] summary {
    border-bottom: 1px solid var(--festival-border);
}

.festival-details__content {
    padding: 1.5rem;
}

.festival-details__content > p:first-child {
    margin-top: 0;
}


/* Individual judging groups */

.festival-score-group {
    margin-top: 2.5rem;
}

.festival-score-group__heading {
    margin-bottom: .75rem;
}

.festival-score-group__heading h3 {
    margin: 0;
    color: var(--festival-navy);
    font-size: 1.35rem;
}

.festival-score-group__heading p {
    margin: .15rem 0 0;
    color: var(--festival-muted);
    font-size: .9rem;
}

.festival-table--scores {
    font-size: .9rem;
}


/* Screen-reader utility */

.festival-results .sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}


/* Tablet */

@media (max-width: 800px) {

    .festival-podium {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /*
       On smaller screens, put first place first rather than
       retaining the visual podium order.
    */

    .festival-podium__card--first {
        order: 1;
    }

    .festival-podium__card--second {
        order: 2;
    }

    .festival-podium__card--third {
        order: 3;
    }

    .festival-podium__card,
    .festival-podium__card--first,
    .festival-podium__card--second,
    .festival-podium__card--third {
        min-height: 0;
    }

}


/*  Mobile Convert primary standings table into cards */

@media (max-width: 650px) {
    
    
        .festival-results {
        margin-top: 60px;
    }
    

    .festival-results__header {
        margin-bottom: 2rem;
    }

    .festival-results__header h2 {
        font-size: 2rem;
    }


    /* Primary standings only */

    .festival-standings > .festival-table-wrap {
        overflow: visible;
    }

    .festival-standings > .festival-table-wrap > .festival-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .festival-standings > .festival-table-wrap > .festival-table,
    .festival-standings > .festival-table-wrap > .festival-table tbody,
    .festival-standings > .festival-table-wrap > .festival-table tr,
    .festival-standings > .festival-table-wrap > .festival-table th,
    .festival-standings > .festival-table-wrap > .festival-table td {
        display: block;
        width: 100%;
    }

    .festival-standings > .festival-table-wrap > .festival-table tr {
        display: grid;
        grid-template-columns: 1fr 1fr;

        margin-bottom: 1rem;
        padding: 1rem;

        border: 1px solid var(--festival-border);
        border-radius: .6rem;

        background: #fff;
        box-shadow: 0 3px 10px rgba(0, 0, 0, .05);
    }

    .festival-standings > .festival-table-wrap > .festival-table tr:hover {
        background: #fff;
    }

    .festival-standings > .festival-table-wrap > .festival-table th,
    .festival-standings > .festival-table-wrap > .festival-table td {
        padding: .6rem;
        border: 0;
        text-align: left;
    }


    /* Ensemble gets full width */

    .festival-standings > .festival-table-wrap > .festival-table tbody th {
        grid-column: 1 / -1;
        padding-top: .25rem;
        font-size: 1.25rem;
    }


    /* Mobile field labels */

    .festival-standings > .festival-table-wrap > .festival-table td::before {
        content: attr(data-label);
        display: block;

        margin-bottom: .15rem;

        color: var(--festival-muted);
        font-size: .7rem;
        font-weight: 700;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

}


/*  Very Small Screens */

@media (max-width: 420px) {

    .festival-standings > .festival-table-wrap > .festival-table tr {
        grid-template-columns: 1fr;
    }

    .festival-details__content {
        padding: 1rem;
    }

}
