.scr-wrap,
.scr-wrap * {
    box-sizing: border-box;
}

.scr-wrap {
    width: 100%;
    max-width: 100% !important;
    margin: 16px 0 0;
    padding: 0 6px 24px;
    line-height: 1.4;
}

.scr-wrap h1,
.scr-wrap h2,
.scr-wrap h3 {
    margin: 0;
    line-height: 1.2;
}

/* Try to defeat narrow theme wrappers around the plugin output */
.entry-content .scr-wrap,
.site-main .scr-wrap,
.elementor-widget-container .scr-wrap,
.elementor .scr-wrap {
    width: 100% !important;
    max-width: 100% !important;
}

.scr-card,
.scr-year-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    width: 100%;
    max-width: 100% !important;
    margin: 0 0 16px 0;
}

.scr-intro-card {
    padding: 12px 16px;
}

.scr-year-card {
    padding: 0;
    overflow: hidden;
}

.scr-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}

.scr-muted {
    opacity: 0.8;
    margin-top: 2px;
    font-size: 15px;
    line-height: 1.35;
}

.scr-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.scr-legend-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-weight: 700;
    font-size: 13px;
    color: #1f2937;
}

.scr-year-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: #fafafa;
    font-size: 20px;
    font-weight: 800;
}

.scr-table-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.scr-table {
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.scr-table th,
.scr-table td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 13px;
    line-height: 1.3;
}

.scr-table th {
    font-weight: 700;
    font-size: 12px;
    background: #fafafa;
}

.scr-table tbody tr:nth-child(even) td {
    background: #fcfcfc;
}

.scr-table tbody tr:last-child td {
    border-bottom: 0;
}

.scr-table th:nth-child(1),
.scr-table td:nth-child(1) {
    width: 15%;
}

.scr-table th:nth-child(2),
.scr-table td:nth-child(2) {
    width: 36%;
}

.scr-table th:nth-child(3),
.scr-table td:nth-child(3) {
    width: 24%;
}

.scr-table th:nth-child(4),
.scr-table td:nth-child(4) {
    width: 7%;
    text-align: center;
}

.scr-table th:nth-child(5),
.scr-table td:nth-child(5) {
    width: 7%;
    text-align: center;
}

.scr-table th:nth-child(6),
.scr-table td:nth-child(6) {
    width: 7%;
    text-align: center;
}

.scr-total {
    font-weight: 800;
}

/* Subtle row hover for desktop */
@media (hover: hover) {
    .scr-table tbody tr:hover td {
        background: #f7f7f7;
    }
}

/* Tablet and down */
@media (max-width: 980px) {
    .scr-wrap {
        padding: 0 4px 22px;
    }

    .scr-intro-card {
        padding: 12px 14px;
    }

    .scr-year-header {
        padding: 11px 14px;
        font-size: 19px;
    }

    .scr-table th,
    .scr-table td {
        padding: 9px 10px;
    }

    .scr-table th {
        font-size: 11px;
    }

    .scr-table td {
        font-size: 12px;
    }
}

/* Mobile card layout */
@media (max-width: 760px) {
    .scr-wrap {
        padding: 0 2px 18px;
    }

    .scr-title {
        font-size: 22px;
    }

    .scr-muted {
        font-size: 14px;
    }

    .scr-year-header {
        font-size: 18px;
    }

    .scr-table,
    .scr-table thead,
    .scr-table tbody,
    .scr-table th,
    .scr-table td,
    .scr-table tr {
        display: block;
        width: 100%;
    }

    .scr-table thead {
        display: none;
    }

    .scr-table tbody {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .scr-table tbody tr:nth-child(even) td {
        background: transparent;
    }

    .scr-table tr {
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 12px;
        background: #fafafa;
        padding: 10px;
    }

    .scr-table td {
        border: 0;
        padding: 6px 0;
        width: 100% !important;
        min-width: 0 !important;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        text-align: left !important;
    }

    .scr-table td::before {
        flex: 0 0 88px;
        font-weight: 700;
        color: rgba(0, 0, 0, 0.75);
    }

    .scr-table td:nth-child(1)::before { content: "Date"; }
    .scr-table td:nth-child(2)::before { content: "Type"; }
    .scr-table td:nth-child(3)::before { content: "Place"; }
    .scr-table td:nth-child(4)::before { content: "Division"; }
    .scr-table td:nth-child(5)::before { content: "Class"; }
    .scr-table td:nth-child(6)::before { content: "Total"; }

    .scr-total {
        text-align: right !important;
    }
}

@media (max-width: 480px) {
    .scr-wrap {
        padding: 0 0 16px;
    }

    .scr-title {
        font-size: 20px;
    }

    .scr-year-header {
        font-size: 17px;
    }

    .scr-table td {
        gap: 10px;
        font-size: 12px;
    }

    .scr-table td::before {
        flex-basis: 78px;
        font-size: 11px;
    }

    .scr-legend-pill {
        font-size: 12px;
        padding: 5px 9px;
    }
}