@font-face {
    font-family: 'OswaldWeb';
    src: url('/static/calcutta/fonts/Oswald-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'OswaldWeb3';
    src: url('/static/calcutta/fonts/Oswald-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'OswaldWeb';
    src: url('/static/calcutta/fonts/Oswald-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'RobotoMonoWeb';
    src: url('/static/calcutta/fonts/RobotoMono-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

body {
    background-color: #198754;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
}

.page-wrapper {
    min-height: 100vh;
    background-color: #198754;
    padding: 24px 12px 40px;
}

/* Main title */
.event-header {
    text-align: center;
    margin-bottom: 18px;
    color: #ffffff;
}

.event-header h1 {
    margin: 0 0 6px 0;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.event-header .subtitle {
    margin: 0;
    font-size: 0.85rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #dfeee8;
}

/* Board shell */
.scoreboard-board {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    position: relative;
}

/* Controls */
.scoreboard-controls {
    max-width: 1500px;
    margin: 0 auto 10px;
    text-align: left;
}

.scoreboard-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

#toggle-columns-btn,
#toggle-view-btn {
    background-color: #ffffff;
    color: #198754;
    border: 3px solid #ffffff;
    border-radius: 0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 12px;
    box-shadow: none;
}

#toggle-columns-btn:hover,
#toggle-columns-btn:focus {
    background-color: #e9f2ef;
    color: #198754;
    border-color: #ffffff;
    box-shadow: none;
}

#toggle-view-btn:hover,
#toggle-view-btn:focus {
    background-color: #e9f2ef;
    color: #198754;
    border-color: #ffffff;
    box-shadow: none;
}

/* LEADERS topper */
.scoreboard-topper {
    position: relative;
    width: 100%;
    height: 96px;
    margin: 0 auto -6px;
    background-color: #198754;
    clip-path: polygon(
    0% 100%,
    1.5% 92%,
    5% 76%,
    11% 54%,
    18% 34%,
    26% 18%,
    34% 8.5%,
    40% 4.5%,
    45% 2.2%,
    50% 0%,
    55% 2.2%,
    60% 4.5%,
    66% 8.5%,
    74% 18%,
    82% 34%,
    89% 54%,
    95% 76%,
    98.5% 92%,
    100% 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 3;
}

.scoreboard-topper::before {
    content: "";
    position: absolute;
    inset: 6px 6px 0 6px;
    background-color: #ffffff;
    clip-path: polygon(
    0% 100%,
    1.5% 92%,
    5% 76%,
    11% 54%,
    18% 34%,
    26% 18%,
    34% 8.5%,
    40% 4.5%,
    45% 2.2%,
    50% 0%,
    55% 2.2%,
    60% 4.5%,
    66% 8.5%,
    74% 18%,
    82% 34%,
    89% 54%,
    95% 76%,
    98.5% 92%,
    100% 100%
    );
    z-index: 0;
}

.scoreboard-topper span {
    position: relative;
    z-index: 1;
    color: #198754;
    font-weight: 900;

    /* THIS is the key */
    font-size: 3.2rem;

    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;

    /* vertically center more naturally */
    transform: translateY(2px);
}


/* Table wrapper */
.table-responsive {
    width: 100%;
    background-color: #ffffff;
    border: 6px solid #198754;
    border-top: 6px solid #198754;
    overflow-x: auto;
}

.table-responsive.totals-only {
    display: inline-block;
    width: auto;
    max-width: 100%;
}

/* Table */
.earnings-table {
    width: 100%;
    min-width: 1400px;
    border-collapse: collapse;
    table-layout: fixed;
    background-color: #ffffff;
    font-size: 0.9rem;
}

table.earnings-table.totals-only {
    table-layout: auto;
    width: auto;
    min-width: 0;
}

table.earnings-table.totals-only th.category-col,
table.earnings-table.totals-only td.category-col {
    display: none;
}

/* First column width */
table.earnings-table th:first-child,
table.earnings-table td:first-child {
    width: 310px;
    min-width: 310px;
    max-width: 310px;
}

/* Header row */
table.earnings-table thead th {
    background-color: #ffffff !important;
    color: #198754 !important;
    border: 3px solid #198754;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    padding: 8px 4px;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
    position: sticky;
    top: 0;
    z-index: 3;
}

/* First header cell */
table.earnings-table thead th.sticky-col {
    z-index: 4;
    background-color: #ffffff !important;
    color: #198754 !important;
    text-align: left !important;
}

/* Table borders */
.earnings-table td,
.earnings-table th {
    border: 2px solid #198754;
}

/* Body cells */
.earnings-table td {
    background-color: #ffffff !important;
    color: #111 !important;
    padding: 10px 6px;
    vertical-align: middle;
    text-align: center;
}

table.earnings-table tbody tr td {
    height: 44px;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Sticky first column */
.sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    font-weight: 800;
    box-shadow: none;
    background-color: #ffffff !important;
    text-align: left !important;
    overflow: hidden;
}

table.earnings-table tr.syndicate-row .name-cell-content,
table.earnings-table tr.team-row .name-cell-content,
table.earnings-table tr.player-row .name-cell-content {
    font-family: 'Oswald', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

table.earnings-table tr.syndicate-row .name-cell-content {
    font-size: clamp(1.3rem, 1.8vw, 1.7rem) !important;
    line-height: 1;
    min-height: 100%;
    display: flex;
    align-items: center;
}

table.earnings-table tr.team-row .name-cell-content {
    font-size: clamp(.9rem, 1.1vw, 1.2rem) !important;
    line-height: 1.05;
}

table.earnings-table tr.player-row .name-cell-content {
    font-size: clamp(0.9rem, 1.1vw, 1.1rem) !important;
    line-height: 1.05;
}

/* Wrapper for names so they don't bleed */
.name-cell-content {
    display: flex;
    align-items: center;
    height: 44px;
    width: 100%;
    font-family: 'Oswald', Arial, sans-serif;
    font-size: 1.5rem;
    line-height: 1.05;
    min-height: 40px;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}



/* Manual scoreboard-style numeric slots */
.numeric-cell {
    position: relative;
    text-align: center !important;
    font-weight: 400;
    font-family: 'OswaldWeb3', 'Comic Sans MS' !important;
    font-size: clamp(1.0rem, 1.2vw, 1.3rem);
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
    line-height: 1;
    letter-spacing: -0.02em;
    padding: 10px 6px;
    background-color: #ffffff !important;
    color: inherit !important;
    border: 2px solid #198754 !important;
    box-shadow:
        /* light backing (almost white) */
        inset 0 0 0 5px #ffffff,

        /* thin tile border (NEW) */
        inset 0 0 0 6px #cfd6da,

        /* depth */
        inset 5px 5px 0 #ffffff,
        inset -5px -5px 0 #ffffff;
}

/* Value colors */
table.earnings-table td.numeric-cell.value-positive {
    color: #b22222 !important;
}

table.earnings-table td.numeric-cell.value-zero {
    color: #198754 !important;
}

/* Syndicate rows */
table.earnings-table tr.syndicate-row td {
    background-color: #ffffff !important;
    color: #111 !important;
    font-weight: 800;
    text-transform: uppercase;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

table.earnings-table tr.syndicate-row {
    cursor: pointer;
}

table.earnings-table tr.syndicate-row .sticky-col {
    background-color: #ffffff !important;
}

/* Team rows */
table.earnings-table tr.team-row td {
    background-color: #ecf7f1 !important;
    color: #111 !important;
    font-weight: 700;
    line-height: .9;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

table.earnings-table tr.team-row {
    cursor: pointer;
}

table.earnings-table tr.team-row .sticky-col {
    background-color: #e1f2e8 !important;
}

/* Player rows */
table.earnings-table tr.player-row td {
    background-color: #ffffff !important;
    color: #111 !important;
    font-weight: 700;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}



.name-text {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expand-arrow {
    flex: 0 0 auto;
}

table.earnings-table tr.player-row .sticky-col {
    background-color: #ffffff !important;
}

.player-indent {
    margin-left: 1.5rem;  /* or 2rem, tweak to taste */
}

/* Keep numeric slots white and framed on all rows */
table.earnings-table tr.syndicate-row td.numeric-cell,
table.earnings-table tr.team-row td.numeric-cell,
table.earnings-table tr.player-row td.numeric-cell {
    font-family: 'OswaldWeb3', 'Comic Sans MS' !important;
    font-weight: 400;
    background-color: #ffffff !important;
    border: 2px solid #111 !important;
    box-shadow:
        inset 0 0 0 5px #ffffff,
        inset 0 0 0 6px #cfd6da,
        inset 5px 5px 0 #ffffff,
        inset -5px -5px 0 #ffffff;
}

/* Totals and Category columns*/
.category-col,
.total-col {
    font-weight: 800;
    width: 9%;
}

table.earnings-table.teams-only tr.syndicate-row,
table.earnings-table.teams-only tr.player-row {
    display: none;
}

/* Expand arrow */
.expand-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 8px;
    vertical-align: middle;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid #198754;
    transition: transform 0.18s ease;
}

.expandable-row.expanded .expand-arrow {
    transform: rotate(90deg);
}

/* Hover */
.team-row:hover td,
.player-row:hover td {
    filter: brightness(0.98);
}

/* Indentation helpers */
.ps-4 {
    padding-left: 2rem !important;
}

.ps-5 {
    padding-left: 3rem !important;
}

/* Mobile */
@media (max-width: 768px) {
    .earnings-table {
        min-width: 1100px;
    }

    .earnings-table td,
    .earnings-table th {
        font-size: 0.72rem;
        padding: 6px 4px;
    }

    table.earnings-table th:first-child,
    table.earnings-table td:first-child,
    .sticky-col {
        width: 390px;
        min-width: 390px;
        max-width: 390px;
    }

    .scoreboard-topper {
        height: 82px;
    }

    .scoreboard-topper span {
        font-size: 1.55rem;
    }

    .event-header h1 {
        font-size: 1.55rem;
    }
}