:root
{
    --ink: #10233d;
    --blue: #1c4d82;
    --blue-deep: #16365d;
    --sky: #b7ddfa;
    --cream: #fffbe8;
    --paper: #fffdf7;
    --line: #c7d3df;
    --muted: #667789;
    --green: #177253;
    --red: #a93a3a;
    --shadow: 3px 3px 0 rgba(25, 59, 98, .15);
}

*
{
    box-sizing: border-box;
}

html
{
    min-height: 100%;
    background: #dfeaf3;
}

body
{
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background-color: #e8f0f6;
    background-image: linear-gradient(rgba(26, 75, 128, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(26, 75, 128, .055) 1px, transparent 1px);
    background-size: 22px 22px;
    font: 16px/1.45 Arial, Helvetica, sans-serif;
}

a
{
    color: var(--blue);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover
{
    color: #0e8e62;
}

button, input, select, textarea
{
    font: inherit;
}

button, .button
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 1px solid var(--blue-deep);
    border-radius: 4px;
    color: #fff;
    background: var(--blue);
    box-shadow: 2px 2px 0 rgba(20, 50, 83, .18);
    cursor: pointer;
    font-weight: 700;
    padding: 7px 12px;
    text-decoration: none;
}

button:hover, .button:hover
{
    color: #fff;
    background: #0f795a;
    border-color: #07513b;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible
{
    outline: 3px solid #f2a61a;
    outline-offset: 2px;
}

.site-header
{
    background: var(--paper);
    border-bottom: 1px solid #b8c9d9;
    box-shadow: 0 2px 0 rgba(22, 54, 93, .1);
}

.header-inner
{
    max-width: 1220px;
    min-height: 76px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand
{
    color: var(--blue-deep);
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.4px;
    text-decoration: none;
    white-space: nowrap;
}

.brand:hover
{
    color: var(--blue-deep);
}

.site-header nav
{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    flex-wrap: wrap;
}

.site-header nav > a, .site-header nav > span, .nav-form button
{
    border-radius: 3px;
    display: inline-flex;
    min-height: 33px;
    align-items: center;
    padding: 6px 9px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.site-header nav > a.is-current
{
    color: #fff;
    background: var(--blue-deep);
}

.site-header nav > a.admin-link
{
    color: #fff;
    background: var(--green);
}

.site-header nav > a.admin-link.is-current
{
    background: #0b513b;
}

.site-header .nav-disabled
{
    color: #a9b4bf;
    cursor: not-allowed;
    text-decoration: line-through;
    text-decoration-color: #d3dce4;
}

.nav-form
{
    display: inline;
    margin: 0;
}

.nav-form button
{
    border: 0;
    color: var(--muted);
    background: transparent;
    box-shadow: none;
}

.nav-form button:hover
{
    color: var(--red);
    background: #fff1f0;
}

.site-main
{
    width: min(1220px, calc(100% - 32px));
    min-height: calc(100vh - 160px);
    margin: 0 auto;
    padding: 36px 0 42px;
}

.site-footer
{
    color: #586b7c;
    padding: 21px;
    border-top: 1px solid #c3d0db;
    font-size: 13px;
    text-align: center;
}

.page-intro
{
    margin: 0 0 22px;
}

.eyebrow
{
    margin: 0 0 3px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

h1, h2, p
{
    margin-top: 0;
}

h1
{
    margin-bottom: 7px;
    color: #123965;
    font-size: clamp(30px, 4vw, 43px);
    letter-spacing: -1.3px;
    line-height: 1.05;
}

h2
{
    margin-bottom: 8px;
    color: #14395d;
    font-size: 22px;
    line-height: 1.15;
}

.page-intro > p:last-child
{
    max-width: 720px;
    margin-bottom: 0;
    color: #4d5f70;
}

.standings-shell, .admin-panel, .auth-card, .coming-soon, .empty-state, .event-detail
{
    background: var(--paper);
    border: 1px solid #c1cfdb;
    border-radius: 7px;
    box-shadow: var(--shadow);
}

.standings-head
{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 19px 12px;
    border-bottom: 1px solid #d7e0e7;
}

.standings-head h2
{
    margin: 0;
}

.standings-head p
{
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.table-scroll
{
    overflow-x: auto;
}

.standings-table, .results-table, .admin-table
{
    width: 100%;
    border-collapse: collapse;
}

.standings-table
{
    min-width: 740px;
}

.standings-table th, .standings-table td, .results-table th, .results-table td, .admin-table th, .admin-table td
{
    padding: 10px 11px;
    border-bottom: 1px solid #dbe3e9;
    text-align: left;
    vertical-align: middle;
}

.standings-table thead th, .results-table thead th, .admin-table thead th
{
    color: #1a426e;
    background: #e8f2fa;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.standings-table tbody tr:hover, .admin-table tbody tr:hover
{
    background: #f3f9fc;
}

.standings-table .rank
{
    width: 48px;
    color: var(--muted);
    font-weight: 700;
    text-align: right;
}

.standings-table .player-name
{
    min-width: 230px;
    color: #163c67;
    font-size: 16px;
}

.standings-table td:not(.rank)
{
    text-align: center;
}

.standings-table td small
{
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.player-results .results-table th small
{
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.standings-table th span
{
    color: #687d91;
    font-size: 10px;
}

.standings-table .total-col
{
    color: #082d5b;
    background: #f5e9ff;
    text-align: center;
}

.filters
{
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: -4px 0 20px;
}

.filters a
{
    border: 1px solid #adc1d3;
    border-radius: 999px;
    color: #315778;
    background: #f7fbff;
    padding: 4px 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.filters a.is-current, .filters a:hover
{
    color: #fff;
    background: var(--blue);
    border-color: var(--blue);
}

.events-layout
{
    display: grid;
    grid-template-columns: minmax(280px, .9fr) minmax(400px, 1.3fr);
    gap: 19px;
    align-items: start;
}

.event-list
{
    display: grid;
    gap: 8px;
    max-height: 720px;
    overflow: auto;
    padding: 2px;
}

.event-card
{
    display: grid;
    gap: 2px;
    border: 1px solid #c5d4e0;
    border-radius: 5px;
    color: var(--ink);
    background: var(--paper);
    box-shadow: 2px 2px 0 rgba(25, 59, 98, .1);
    padding: 11px;
    text-decoration: none;
}

.event-card:hover, .event-card.is-selected
{
    color: var(--ink);
    border-color: #3f82bd;
    background: #f0f8ff;
}

.event-card strong
{
    color: #173f69;
}

.event-card span:last-child
{
    color: var(--muted);
    font-size: 12px;
}

.event-date
{
    color: #0d7655 !important;
    font-size: 12px;
    font-weight: 800;
}

.event-detail
{
    min-height: 240px;
    overflow: hidden;
}

.event-head
{
    padding: 20px 20px 8px;
}

.event-head h2
{
    margin-bottom: 4px;
}

.event-head p:last-of-type
{
    color: var(--muted);
}

.source-link
{
    display: inline-block;
    margin: 2px 0 12px;
    font-size: 14px;
    font-weight: 700;
}

.event-page-actions, .player-page-actions
{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.results-table th:first-child, .results-table td:first-child, .results-table th:last-child, .results-table td:last-child
{
    text-align: center;
}

.notice
{
    margin-bottom: 18px;
    border: 1px solid;
    border-radius: 5px;
    padding: 10px 12px;
    box-shadow: 2px 2px 0 rgba(22, 54, 93, .1);
    font-weight: 700;
}

.notice-success
{
    color: #13553f;
    background: #e2f7ea;
    border-color: #aad9bd;
}

.notice-error
{
    color: #7d2828;
    background: #fff0ee;
    border-color: #edb7af;
}

.empty-state, .coming-soon
{
    max-width: 700px;
    padding: 34px;
    text-align: center;
}

.empty-state.compact
{
    max-width: none;
    box-shadow: none;
    padding: 28px;
}

.empty-state h1, .coming-soon h1
{
    margin-bottom: 10px;
}

.coming-soon
{
    margin: 28px auto;
}

.auth-card
{
    width: min(460px, 100%);
    margin: 34px auto;
    padding: 28px;
}

.auth-card form, .event-form
{
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

label
{
    display: grid;
    gap: 5px;
    color: #1a456f;
    font-size: 13px;
    font-weight: 800;
}

input, select, textarea
{
    width: 100%;
    border: 1px solid #aebfcd;
    border-radius: 4px;
    color: var(--ink);
    background: #fff;
    padding: 8px;
}

textarea
{
    min-height: 130px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    line-height: 1.4;
}

code
{
    border-radius: 3px;
    background: #e8f2fa;
    padding: 1px 4px;
}

.admin-head
{
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
    margin-bottom: 22px;
}

.admin-head h1
{
    margin-bottom: 3px;
}

.admin-head p:last-child
{
    margin-bottom: 0;
    color: var(--muted);
}

.admin-tabs
{
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-tabs a
{
    border: 1px solid #b7c8d8;
    border-radius: 4px;
    color: #315778;
    background: #fff;
    padding: 6px 9px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.admin-tabs a.is-current
{
    color: #fff;
    background: var(--blue-deep);
    border-color: var(--blue-deep);
}

.stat-grid
{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 13px;
    margin-bottom: 18px;
}

.stat-grid article
{
    min-height: 105px;
    display: grid;
    align-content: space-between;
    border: 1px solid #bfd0dc;
    border-radius: 6px;
    background: var(--paper);
    box-shadow: 2px 2px 0 rgba(25, 59, 98, .1);
    padding: 15px;
}

.stat-grid span
{
    color: #567084;
    font-size: 13px;
    font-weight: 800;
}

.stat-grid strong
{
    color: #143e6a;
    font-size: 32px;
    line-height: 1;
}

.admin-panel
{
    margin-top: 18px;
    padding: 19px;
}

.admin-panel h2
{
    margin-bottom: 9px;
}

.panel-title
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 9px;
}

.panel-title h2
{
    margin: 0;
}

.form-panel
{
    padding: 22px;
}

.form-grid
{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.checkbox-field
{
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.checkbox-field input
{
    width: auto;
    margin-top: 3px;
}

.checkbox-field small
{
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-weight: 400;
}

.compact-grid
{
    align-items: end;
}

.current-period-form
{
    display: flex;
    align-items: end;
    gap: 10px;
    max-width: 650px;
}

.current-period-form select
{
    flex: 1;
}

.admin-table
{
    min-width: 700px;
    font-size: 14px;
}

.admin-table th
{
    font-weight: 800;
}

.admin-table td > input, .admin-table td > select
{
    min-width: 92px;
    padding: 5px;
}

.admin-table th small
{
    display: block;
    color: #0e7655;
    font-size: 11px;
}

.admin-table .actions
{
    display: flex;
    align-items: center;
    gap: 9px;
}

.admin-table .actions form
{
    margin: 0;
}

.admin-table .actions button, .inline-edit button
{
    min-height: 30px;
    padding: 4px 7px;
    font-size: 12px;
}

.inline-edit
{
    display: flex;
    gap: 6px;
}

.inline-edit input
{
    min-width: 180px;
    padding: 5px;
}

.status
{
    display: inline-block;
    border-radius: 99px;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.status-pending
{
    color: #775500;
    background: #fff0bd;
}

.status-published
{
    color: #0a6845;
    background: #d8f3e2;
}

.status-rejected
{
    color: #852d2d;
    background: #ffe0dd;
}

@media (max-width: 880px)
{
    .header-inner
    {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .site-header nav
    {
        justify-content: flex-start;
    }

    .events-layout
    {
        grid-template-columns: 1fr;
    }

    .event-list
    {
        max-height: 360px;
    }

    .stat-grid
    {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-head
    {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-tabs
    {
        justify-content: flex-start;
    }
}

@media (max-width: 560px)
{
    body
    {
        font-size: 15px;
    }

    .header-inner
    {
        padding: 10px 14px;
    }

    .site-header nav
    {
        gap: 0;
    }

    .site-header nav > a, .site-header nav > span, .nav-form button
    {
        min-height: 29px;
        padding: 4px 6px;
        font-size: 12px;
    }

    .site-main
    {
        width: min(100% - 20px, 1220px);
        padding-top: 25px;
    }

    .standings-head, .event-head, .admin-panel, .form-panel
    {
        padding-left: 14px;
        padding-right: 14px;
    }

    .form-grid
    {
        grid-template-columns: 1fr;
    }

    .current-period-form
    {
        align-items: stretch;
        flex-direction: column;
    }

    .stat-grid
    {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }

    .stat-grid article
    {
        min-height: 88px;
        padding: 11px;
    }

    .stat-grid strong
    {
        font-size: 27px;
    }
}

:root
{
    --ink: #171a1d;
    --blue: #0e4e83;
    --blue-deep: #172b3f;
    --paper: #fffef9;
    --line: #172027;
    --muted: #68747c;
    --green: #007f3f;
    --red: #ae1e28;
    --shadow: none;
}

html
{
    background: var(--paper);
}

body
{
    background-color: #fbfbf8;
    background-image: linear-gradient(rgba(40, 49, 57, .11) 1px, transparent 1px), linear-gradient(90deg, rgba(40, 49, 57, .11) 1px, transparent 1px);
    background-size: 16px 16px;
    font-family: "Google Sans", "Google Sans Text", Arial, sans-serif;
}

button, .button
{
    border: 1px solid var(--line);
    border-radius: 0;
    color: var(--ink);
    background: #e6e9ed;
    box-shadow: none;
}

button:hover, .button:hover
{
    color: #fff;
    background: var(--green);
    border-color: #005e2e;
}

.site-header
{
    border: 0;
    box-shadow: none;
    background: transparent;
    padding-top: 7px;
}

.header-inner
{
    width: min(1240px, calc(100% - 24px));
    min-height: 65px;
    border: 1px solid var(--line);
    background: var(--paper);
    padding: 7px;
}

.brand
{
    color: var(--ink);
    font-weight: 700;
}

.brand:hover
{
    color: var(--ink);
}

.site-header nav
{
    gap: 7px;
}

.site-header nav > a, .site-header nav > span, .nav-form button
{
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 0;
    color: var(--ink);
    background: #e6e9ed;
    padding: 6px 11px;
}

.site-header nav > a.is-current
{
    color: #fff;
    background: var(--blue-deep);
    border-color: var(--blue-deep);
}

.site-header nav > a.admin-link
{
    color: #08522f;
    background: #dffbe7;
}

.site-header nav > a.admin-link.is-current
{
    color: #fff;
    background: var(--green);
    border-color: #005e2e;
}

.site-header nav > a:hover
{
    color: #fff;
    background: var(--green);
    border-color: #005e2e;
}

.site-header .nav-disabled
{
    color: #8b949b;
    background: #f3f3f0;
}

.nav-form button
{
    color: var(--red);
    background: #ffe9eb;
}

.nav-form button:hover
{
    color: #fff;
    background: var(--red);
    border-color: #7e1019;
}

.site-main
{
    min-height: calc(100vh - 134px);
    padding-top: 30px;
}

.site-footer
{
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    border-top: 1px solid var(--line);
    padding: 18px 0 23px;
}

h1, h2
{
    color: var(--ink);
}

.standings-shell, .admin-panel, .auth-card, .coming-soon, .empty-state, .event-detail, .timeline-shell, .chart-box, .player-results, .credits-copy
{
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--paper);
    box-shadow: none;
}

.standings-head, .timeline-head
{
    border-bottom: 1px solid var(--line);
    padding: 13px 15px;
}

.standings-head h2, .timeline-head h2
{
    margin: 0;
}

.standings-head.is-compact
{
    justify-content: flex-end;
}

.standings-stats
{
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: #40505e;
    font-size: 13px;
    font-weight: 600;
}

.standings-stats span
{
    border-left: 1px solid #cdd5da;
    padding-left: 7px;
}

.standings-stats span:first-child
{
    border-left: 0;
    padding-left: 0;
}

.standings-table
{
    min-width: 920px;
}

.standings-table th, .standings-table td, .results-table th, .results-table td, .admin-table th, .admin-table td
{
    border-bottom-color: #cdd5da;
}

.standings-table thead th, .results-table thead th, .admin-table thead th
{
    background: #e8f5ff;
    border-bottom-color: var(--line);
    color: #073e6c;
}

.standings-table .player-name
{
    color: var(--ink);
}

.standings-table .player-name a
{
    color: inherit;
    text-decoration: none;
}

.standings-table .player-name a:hover
{
    color: var(--green);
    text-decoration: underline;
}

.standings-table .total-col
{
    background: #f6ecff;
    color: #24124a;
}

.result-values
{
    display: block;
    min-height: 20px;
    color: #0d2d49;
    font-size: 14px;
    letter-spacing: .01em;
    white-space: nowrap;
}

.standings-table th.event-column, .standings-table td.event-column
{
    border-left: 1px solid var(--line);
    text-align: center;
}

.standings-table tr.is-auto-invite > *
{
    background: #e3ffe9;
}

.standings-table tr.is-auto-invite .total-col
{
    background: #caffd6;
}

.invite-badge
{
    display: inline-block;
    min-width: 67px;
    border: 1px solid currentColor;
    padding: 2px 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .03em;
    line-height: 1.25;
    text-transform: uppercase;
}

.player-region-badge
{
    display: inline-block;
    margin-left: 7px;
    border: 1px solid #5b7893;
    padding: 2px 5px;
    color: #28455f;
    background: #e3f1fc;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.2;
    text-transform: uppercase;
    vertical-align: middle;
}

.invite-badge.is-auto
{
    color: #006b34;
    background: #c8ffd8;
}

.invite-badge.is-invite-tie
{
    color: #4f2b79;
    background: #efe2ff;
}

.invite-badge.is-travel-award-tie
{
    color: #735100;
    background: #fff2c3;
}

.invite-badge.is-travel-stipend-tie
{
    color: #07516f;
    background: #d8f3ff;
}

.rank-separator th
{
    height: 15px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: #41515d;
    background: #f0f2f1;
    padding: 2px 11px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    text-align: left;
    text-transform: uppercase;
}

.filters a, .admin-tabs a
{
    border: 1px solid var(--line);
    border-radius: 0;
    color: var(--ink);
    background: #e6e9ed;
}

.filters a.is-current, .filters a:hover, .admin-tabs a.is-current, .admin-tabs a:hover
{
    color: #fff;
    background: var(--blue-deep);
    border-color: var(--blue-deep);
}

.event-card
{
    border: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
}

.event-card:hover, .event-card.is-selected
{
    border-color: var(--green);
    background: #effff3;
}

.event-card strong
{
    color: var(--ink);
}

.notice, .status
{
    border-radius: 0;
    box-shadow: none;
}

input, select, textarea
{
    border: 1px solid var(--line);
    border-radius: 0;
}

textarea::placeholder
{
    white-space: pre-line;
}

.field-label
{
    white-space: nowrap;
}

.field-optional
{
    color: var(--muted);
    font-weight: 400;
}

.timeline-shell
{
    overflow: hidden;
}

.timeline-head
{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 17px;
}

.timeline-legend
{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    color: #40505e;
    font-size: 12px;
    font-weight: 600;
}

.timeline-legend span
{
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.timeline-key
{
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 1px solid var(--line);
    background: #eef0f0;
}

.timeline-key.is-auto
{
    background: #51d67c;
}

.timeline-key.is-invite
{
    background: #baf6c8;
}

.timeline-key.is-out
{
    background: #ecf0f1;
}

.timeline-totals
{
    display: grid;
    color: #40505e;
    text-align: right;
}

.timeline-totals strong
{
    color: var(--ink);
    font-size: 28px;
    line-height: 1;
}

.timeline-totals span
{
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.player-intro
{
    display: grid;
    gap: 7px;
}

.player-links
{
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
    justify-self: start;
    max-width: 100%;
    border: 1px solid var(--line);
    background: #e8f5ff;
    padding: 8px 10px;
}

.player-links a
{
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    font-size: 14px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.player-links img
{
    width: 16px;
    height: 16px;
    flex: none;
    object-fit: contain;
}

.back-link
{
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    background: var(--paper);
    padding: 6px 9px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.player-suggestion-action
{
    margin-top: 18px;
}

.player-summary
{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.player-summary article
{
    min-height: 88px;
    display: grid;
    align-content: space-between;
    border: 1px solid var(--line);
    background: var(--paper);
    padding: 13px;
}

.player-summary span
{
    color: #40505e;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.player-summary strong
{
    color: var(--ink);
    font-size: 25px;
    line-height: 1;
}

.player-summary article.is-auto
{
    background: #e3ffe9;
}

.player-summary article.is-auto strong
{
    color: #006b34;
}

.player-summary article.is-invite
{
    background: #f2fff5;
}

.player-summary article.is-invite strong
{
    color: #17763f;
}

.player-summary article.is-invite-tie
{
    background: #f7efff;
}

.player-summary article.is-invite-tie strong
{
    color: #653c8f;
}

.player-summary article.is-out
{
    background: #f2f4f4;
}

.chart-box
{
    overflow: hidden;
    margin-bottom: 16px;
}

.chart-head
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding: 13px 15px;
}

.chart-head h2
{
    margin: 0;
}

.chart-key
{
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #40505e;
    font-size: 12px;
    font-weight: 700;
}

.chart-key i
{
    width: 20px;
    border-top: 2px dashed var(--red);
}

.chart-scroll
{
    overflow-x: auto;
    padding: 12px 8px 2px;
}

.rank-chart
{
    display: block;
    min-width: 680px;
    width: 100%;
    height: auto;
}

.chart-label, .chart-date
{
    fill: #59666f;
    font-family: "Google Sans", Arial, sans-serif;
    font-size: 11px;
}

.cutoff-line
{
    fill: none;
    stroke: var(--red);
    stroke-width: 2;
    stroke-dasharray: 5 4;
}

.rank-line
{
    fill: none;
    stroke: #123f68;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.player-results
{
    overflow: hidden;
}

.credits-copy
{
    min-height: 140px;
    padding: 22px;
}

@media (max-width: 620px)
{
    .site-header
    {
        padding-top: 5px;
    }

    .header-inner
    {
        width: min(100% - 12px, 1240px);
        padding: 6px;
    }

    .site-header nav
    {
        gap: 5px;
    }

    .site-header nav > a, .site-header nav > span, .nav-form button
    {
        min-height: 31px;
        padding: 5px 7px;
        font-size: 12px;
    }

    .site-main, .site-footer
    {
        width: min(100% - 20px, 1220px);
    }

    .standings-head, .timeline-head
    {
        align-items: flex-start;
        flex-direction: column;
    }

    .player-summary
    {
        grid-template-columns: 1fr;
    }

    .timeline-totals
    {
        text-align: left;
    }
}

.players-table
{
    min-width: 1080px;
}

.players-table th small, .official-points small
{
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.player-site-points, .official-points
{
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.leaderboard-gap
{
    display: inline-block;
    border: 1px solid var(--line);
    padding: 3px 6px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.leaderboard-gap.is-unchecked
{
    color: #5d6670;
    background: #edf0f3;
}

.leaderboard-gap.is-match
{
    color: #075c31;
    background: #e3ffe9;
    border-color: #6fba83;
}

.leaderboard-gap.is-missing
{
    color: #725000;
    background: #fff0bd;
    border-color: #d5ae45;
}

.leaderboard-gap.is-ahead
{
    color: #164f79;
    background: #e1f2ff;
    border-color: #88badc;
}

.leaderboard-fields
{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.leaderboard-fields > div
{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    grid-column: 1 / -1;
}

.leaderboard-fields small
{
    flex-basis: 100%;
    color: var(--muted);
    font-size: 12px;
}

.leaderboard-fields .small-button, .leaderboard-fields button
{
    min-height: 30px;
}

.leaderboard-actions
{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.leaderboard-actions form
{
    margin: 0;
}

.leaderboard-import
{
    grid-column: 1 / -1;
}

.leaderboard-import textarea
{
    min-height: 170px;
}

.header-inner
{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "brand tools"
        "nav nav";
    align-items: center;
    gap: 8px 20px;
}

.header-top, .site-menu
{
    display: contents;
}

.brand
{
    grid-area: brand;
}

.site-header .header-tools
{
    grid-area: tools;
}

.site-header .main-nav
{
    grid-area: nav;
}

.menu-toggle
{
    display: none;
}

@media (max-width: 620px)
{
    .header-inner
    {
        grid-template-areas:
            "brand toggle"
            "menu menu";
        gap: 8px;
    }

    .menu-toggle
    {
        display: inline-flex;
        grid-area: toggle;
        min-height: 34px;
        padding: 5px 8px;
        font-size: 12px;
        white-space: nowrap;
    }

    .site-menu
    {
        display: none;
        grid-area: menu;
        flex-direction: column;
        gap: 8px;
        padding-top: 8px;
        border-top: 1px solid var(--line);
    }

    .site-menu.is-open
    {
        display: flex;
    }

    .site-header .main-nav
    {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        order: 1;
    }

    .site-header .header-tools
    {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
        margin-left: 0;
        order: 2;
    }

    .site-header .main-nav > .submit-event-link
    {
        grid-column: 1 / -1;
    }

    .site-header .main-nav > a, .site-header .main-nav > span, .site-header .header-tools > a, .site-header .header-tools .nav-form, .site-header .header-tools .theme-toggle
    {
        width: 100%;
        min-height: 37px;
        justify-content: center;
        padding: 7px 8px;
        font-size: 12px;
    }

    .site-header .header-tools .nav-form button
    {
        width: 100%;
        min-height: 37px;
        padding: 7px 8px;
        font-size: 12px;
    }

    .standings-table
    {
        min-width: 560px;
    }

    .standings-table .player-name
    {
        min-width: 200px;
        white-space: normal;
    }

    .standings-table .total-col
    {
        display: table-cell;
        width: 54px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .leaderboard-fields
    {
        grid-template-columns: 1fr;
    }
}

html[data-theme="dark"] .leaderboard-gap.is-unchecked
{
    color: #d7dde2;
    background: #3a4249;
}

html[data-theme="dark"] .leaderboard-gap.is-missing
{
    color: #ffe8a0;
    background: #5d4a16;
}

html[data-theme="dark"] .leaderboard-gap.is-ahead
{
    color: #c8e8ff;
    background: #174763;
}

html[data-theme="dark"] .site-menu
{
    border-color: #4b5964;
}

.site-header .theme-toggle
{
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 0;
    color: var(--ink);
    background: #e6e9ed;
    padding: 6px 11px;
    font-size: 14px;
}

.site-header .theme-toggle:hover
{
    color: #fff;
    background: var(--blue-deep);
    border-color: var(--blue-deep);
}

.event-card
{
    display: block;
}

.event-card .event-date, .event-card .event-title, .event-card .event-meta
{
    display: block;
}

.event-card .event-title
{
    margin: 2px 0 3px;
}

.event-card .event-meta
{
    color: var(--muted);
    font-size: 12px;
}

.standings-table .rank
{
    width: 52px;
    padding-left: 12px;
    padding-right: 10px;
    text-align: center;
}

.standings-table .player-name
{
	font-size: 90%;
    min-width: 300px;
    padding-left: 19px;
    padding-right: 19px;
    line-height: 1.25;
    white-space: nowrap;
}

.standings-table .player-name .invite-badge
{
    margin-left: 8px;
    vertical-align: middle;
}

.result-values
{
    min-height: 0;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

.standings-table tr.is-worlds-invite:not(.is-top-four):not(.is-top-eight) > *
{
    background: var(--paper);
}

.standings-table tr.is-worlds-invite:not(.is-top-four):not(.is-top-eight) .total-col
{
    background: #f6ecff;
}

.standings-table tr.is-top-four > *
{
    color: #5b4300;
    background: #fff0bd;
}

.standings-table tr.is-top-four .total-col
{
    color: #553b00;
    background: #ffe28c;
}

.standings-table tr.is-top-eight > *
{
    color: #303942;
    background: #edf0f3;
}

.standings-table tr.is-top-eight .total-col
{
    color: #29323a;
    background: #dbe1e6;
}

.standings-table tr.is-auto-invite > *
{
    color: #075c31;
    background: #e3ffe9;
}

.standings-table tr.is-auto-invite .total-col
{
    color: #075c31;
    background: #caffd6;
}

.standings-table tr.is-invite-tie:not(.is-worlds-invite):not(.is-auto-invite) > *
{
    color: #47256f;
    background: #f6edff;
}

.standings-table tr.is-invite-tie:not(.is-worlds-invite):not(.is-auto-invite) .total-col
{
    color: #422062;
    background: #ead9fb;
}

.standings-table tr.is-travel-award > *
{
    color: #5b4300;
    background: #fff0bd;
}

.standings-table tr.is-travel-award .total-col
{
    color: #553b00;
    background: #ffe28c;
}

.standings-table tr.is-travel-stipend > *
{
    color: #073d5e;
    background: #dff4ff;
}

.standings-table tr.is-travel-stipend .total-col
{
    color: #123a57;
    background: #c8eaff;
}

.standings-table tr.is-travel-award-tie:not(.is-travel-award) > *
{
    color: #725000;
    background: #fff8df;
}

.standings-table tr.is-travel-award-tie:not(.is-travel-award) .total-col
{
    color: #654400;
    background: #ffebae;
}

.standings-table tr.is-travel-stipend-tie:not(.is-travel-stipend) > *
{
    color: #07516f;
    background: #e9f8ff;
}

.standings-table tr.is-travel-stipend-tie:not(.is-travel-stipend) .total-col
{
    color: #084764;
    background: #d3f0ff;
}

.standings-table tr.is-outside-invite > *
{
    padding-top: 5px;
    padding-bottom: 5px;
}

.standings-table tr.is-outside-invite .player-name
{
    font-size: 13px;
}

.standings-table tr.is-outside-invite .result-values
{
    font-size: 12px;
}

.standings-table tr.is-outside-invite .total-col strong
{
    font-size: 13px;
}

.standings-table tr.is-invite-tie.is-outside-invite > *
{
    padding-top: 10px;
    padding-bottom: 10px;
}

.standings-table tr.is-invite-tie.is-outside-invite .player-name
{
    font-size: 16px;
}

.standings-table tr.is-invite-tie.is-outside-invite .result-values, .standings-table tr.is-invite-tie.is-outside-invite .total-col strong
{
    font-size: 14px;
}

.admin-table
{
    min-width: 840px;
}

.admin-table .actions
{
    display: table-cell;
    width: 1%;
    min-width: 188px;
    padding-left: 10px;
    padding-right: 10px;
    text-align: right;
    vertical-align: middle;
    white-space: nowrap;
}

.admin-table .table-actions
{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.admin-table .table-actions form
{
    margin: 0;
}

.link-fields
{
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.link-fields > div
{
    grid-column: 1 / -1;
}

.admin-table .small-button, .admin-table .actions button
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border: 1px solid var(--line);
    border-radius: 0;
    color: var(--ink);
    background: #e6e9ed;
    padding: 4px 7px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.admin-table .small-button:hover, .admin-table .actions button:hover
{
    color: #fff;
    background: var(--green);
    border-color: #005e2e;
}

.admin-table .actions .danger-button
{
    color: #8d1421;
    background: #ffe7e8;
    border-color: #b3545b;
}

.admin-table .actions .danger-button:hover
{
    color: #fff;
    background: var(--red);
    border-color: #7e1019;
}

html[data-theme="dark"]
{
    color-scheme: dark;
    --ink: #eef3f6;
    --blue: #86c9f1;
    --blue-deep: #28536f;
    --paper: #171c21;
    --line: #87939e;
    --muted: #b2bdc5;
    --green: #39bd75;
    --red: #ec727b;
}

html[data-theme="dark"] body
{
    background-color: #0e1317;
    background-image: linear-gradient(rgba(196, 212, 224, .14) 1px, transparent 1px), linear-gradient(90deg, rgba(196, 212, 224, .14) 1px, transparent 1px);
}

html[data-theme="dark"] .player-links
{
    background: #1c394e;
}

html[data-theme="dark"] .player-links a:hover
{
    color: var(--green);
}

html[data-theme="dark"] .header-inner, html[data-theme="dark"] .site-footer, html[data-theme="dark"] .standings-shell, html[data-theme="dark"] .admin-panel, html[data-theme="dark"] .auth-card, html[data-theme="dark"] .coming-soon, html[data-theme="dark"] .empty-state, html[data-theme="dark"] .event-detail, html[data-theme="dark"] .timeline-shell, html[data-theme="dark"] .chart-box, html[data-theme="dark"] .player-results, html[data-theme="dark"] .credits-copy, html[data-theme="dark"] .stat-grid article, html[data-theme="dark"] .player-summary article
{
    background: var(--paper);
}

html[data-theme="dark"] .site-footer
{
    color: var(--muted);
}

html[data-theme="dark"] .site-header nav > a, html[data-theme="dark"] .site-header nav > span, html[data-theme="dark"] .site-header .theme-toggle, html[data-theme="dark"] .filters a, html[data-theme="dark"] .admin-tabs a, html[data-theme="dark"] .admin-table .small-button, html[data-theme="dark"] .admin-table .actions button
{
    color: var(--ink);
    background: #272e35;
}

html[data-theme="dark"] .site-header nav > a.is-current, html[data-theme="dark"] .filters a.is-current, html[data-theme="dark"] .admin-tabs a.is-current
{
    color: #fff;
    background: var(--blue-deep);
    border-color: var(--blue-deep);
}

html[data-theme="dark"] .site-header nav > a.admin-link
{
    color: #c9ffe0;
    background: #154f35;
}

html[data-theme="dark"] .site-header .nav-disabled
{
    color: #9ba5ae;
    background: #252a30;
}

html[data-theme="dark"] .nav-form button, html[data-theme="dark"] .admin-table .actions .danger-button
{
    color: #ffd9dc;
    background: #492127;
    border-color: #9a4750;
}

html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] .brand, html[data-theme="dark"] .brand:hover, html[data-theme="dark"] .standings-table .player-name, html[data-theme="dark"] .event-card strong, html[data-theme="dark"] .player-summary strong
{
    color: var(--ink);
}

html[data-theme="dark"] label, html[data-theme="dark"] .stat-grid span, html[data-theme="dark"] .standings-stats, html[data-theme="dark"] .timeline-legend, html[data-theme="dark"] .timeline-totals, html[data-theme="dark"] .player-summary span, html[data-theme="dark"] .chart-key
{
    color: var(--muted);
}

html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea
{
    color: var(--ink);
    background: #11171c;
    border-color: var(--line);
}

html[data-theme="dark"] code
{
    color: var(--ink);
    background: #25303a;
}

html[data-theme="dark"] .standings-table thead th, html[data-theme="dark"] .results-table thead th, html[data-theme="dark"] .admin-table thead th
{
    color: #d6f0ff;
    background: #1c394e;
}

html[data-theme="dark"] .standings-table .total-col
{
    color: #eadbff;
    background: #352446;
}

html[data-theme="dark"] .result-values
{
    color: var(--ink);
}

html[data-theme="dark"] .event-card
{
    background: var(--paper);
}

html[data-theme="dark"] .event-card:hover, html[data-theme="dark"] .event-card.is-selected
{
    color: var(--ink);
    background: #1a3829;
}

html[data-theme="dark"] .timeline-key.is-out
{
    background: #2a3137;
}

html[data-theme="dark"] .chart-label, html[data-theme="dark"] .chart-date
{
    fill: #c6d0d8;
}

html[data-theme="dark"] .rank-line
{
    stroke: #88cff6;
}

html[data-theme="dark"] .standings-table tr.is-worlds-invite:not(.is-top-four):not(.is-top-eight) > *
{
    background: var(--paper);
}

html[data-theme="dark"] .standings-table tr.is-worlds-invite:not(.is-top-four):not(.is-top-eight) .total-col
{
    color: #eadbff;
    background: #352446;
}

html[data-theme="dark"] .standings-table tr.is-top-four > *
{
    color: #fff2bd;
    background: #68501a;
}

html[data-theme="dark"] .standings-table tr.is-top-four .total-col
{
    color: #fff3c4;
    background: #7a5b12;
}

html[data-theme="dark"] .standings-table tr.is-top-eight > *
{
    color: #eef4f7;
    background: #3c464f;
}

html[data-theme="dark"] .standings-table tr.is-top-eight .total-col
{
    color: #f1f5f7;
    background: #4a555e;
}

html[data-theme="dark"] .standings-table tr.is-auto-invite > *
{
    color: #d2ffe1;
    background: #174c30;
}

html[data-theme="dark"] .standings-table tr.is-auto-invite .total-col
{
    color: #d2ffe1;
    background: #0e6337;
}

html[data-theme="dark"] .standings-table tr.is-invite-tie:not(.is-worlds-invite):not(.is-auto-invite) > *
{
    color: #eed9ff;
    background: #4b3561;
}

html[data-theme="dark"] .standings-table tr.is-invite-tie:not(.is-worlds-invite):not(.is-auto-invite) .total-col
{
    color: #f1dfff;
    background: #593e70;
}

html[data-theme="dark"] .standings-table tr.is-travel-award > *
{
    color: #fff2bd;
    background: #68501a;
}

html[data-theme="dark"] .standings-table tr.is-travel-award .total-col
{
    color: #fff3c4;
    background: #7a5b12;
}

html[data-theme="dark"] .standings-table tr.is-travel-stipend > *
{
    color: #d7efff;
    background: #174967;
}

html[data-theme="dark"] .standings-table tr.is-travel-stipend .total-col
{
    color: #d7efff;
    background: #205b7c;
}

html[data-theme="dark"] .standings-table tr.is-travel-award-tie:not(.is-travel-award) > *
{
    color: #fff0b2;
    background: #68511c;
}

html[data-theme="dark"] .standings-table tr.is-travel-award-tie:not(.is-travel-award) .total-col
{
    color: #fff1b6;
    background: #765a16;
}

html[data-theme="dark"] .standings-table tr.is-travel-stipend-tie:not(.is-travel-stipend) > *
{
    color: #d7efff;
    background: #1d506e;
}

html[data-theme="dark"] .standings-table tr.is-travel-stipend-tie:not(.is-travel-stipend) .total-col
{
    color: #e0f4ff;
    background: #275e7d;
}

@media (max-width: 620px)
{
    .site-header .theme-toggle
    {
        min-height: 31px;
        padding: 5px 7px;
        font-size: 12px;
    }
}

.submit-panel
{
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

.captcha
{
    display: grid;
    grid-template-columns: minmax(0, 1fr) 156px;
    align-items: center;
    gap: 22px;
    border: 1px solid var(--line);
    background: #e8f5ff;
    padding: 16px;
}

.captcha .eyebrow
{
    margin-bottom: 4px;
}

.captcha h2
{
    margin-bottom: 12px;
}

.captcha-image
{
    display: block;
    width: 156px;
    height: 156px;
    object-fit: contain;
    image-rendering: auto;
}

html[data-theme="dark"] .captcha
{
    background: #1c394e;
}

@media (max-width: 560px)
{
    .captcha
    {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .captcha-image
    {
        width: 132px;
        height: 132px;
        justify-self: center;
    }
}

.site-header nav > a.submit-event-link, .submit-button
{
    color: #fff;
    background: #e91e82;
    border-color: #a70b58;
}

.site-header nav > a.submit-event-link:hover, .submit-button:hover
{
    color: #fff;
    background: #bd0d67;
    border-color: #800240;
}

.site-footer
{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0;
    border: 0;
    color: #edf5fa;
    background: #172b3f;
    padding: 17px 24px;
    text-align: center;
}

.site-footer a
{
    color: #fff;
    font-weight: 700;
}

.site-footer a:hover
{
    color: #ffe0f1;
}

.footer-links
{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.site-footer a.footer-login
{
    min-height: 30px;
    border-color: #a8bbcb;
    color: #fff;
    background: transparent;
    padding: 4px 10px;
    text-decoration: none;
}

.site-footer a.footer-login:hover
{
    color: #fff;
    background: var(--green);
}

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

.player-summary small
{
    color: #53636f;
    font-size: 12px;
    font-weight: 600;
}

.player-summary article.is-ace-trainer
{
    border: 3px solid transparent;
    background: linear-gradient(var(--paper), var(--paper)) padding-box, conic-gradient(#ff4d4d, #ffa63d, #fff167, #46d96c, #4ac7ff, #9071ff, #f06ece, #ff4d4d) border-box;
    padding: 11px;
}

.import-actions
{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.import-actions form
{
    display: grid;
    align-content: start;
    gap: 6px;
    border: 1px solid var(--line);
    background: var(--paper);
    padding: 14px;
}

.import-actions strong
{
    color: var(--ink);
}

.import-actions small
{
    min-height: 34px;
    color: #53636f;
    font-weight: 600;
}

.import-actions button
{
    width: 100%;
    margin-top: 5px;
}

.player-targets, .player-bfls
{
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    background: var(--paper);
}

.player-targets > header, .player-bfls > header
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding: 13px 15px;
}

.player-targets h2, .player-bfls h2
{
    margin: 0;
}

.player-bfls > header > span
{
    color: #40505e;
    font-size: 12px;
    font-weight: 700;
}

.target-grid, .player-bfl-grid
{
    display: grid;
    gap: 1px;
    background: var(--line);
}

.target-grid
{
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.player-bfl-grid
{
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.target-grid article, .player-bfl-grid article
{
    display: grid;
    gap: 5px;
    background: var(--paper);
    padding: 15px;
}

.target-grid span, .player-bfl-grid span
{
    color: #40505e;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.target-grid strong, .player-bfl-grid strong
{
    color: var(--ink);
    font-size: 20px;
    line-height: 1.15;
}

.target-grid small, .player-bfl-grid small
{
    color: #53636f;
    font-size: 12px;
    font-weight: 600;
}

.target-grid article.is-gold, .target-grid article.is-silver
{
    position: relative;
}

.target-grid article.is-gold::after, .target-grid article.is-silver::after
{
    content: "";
    position: absolute;
    inset: 0;
    border: 3px solid;
    pointer-events: none;
}

.target-grid article.is-gold::after
{
    border-image: linear-gradient(135deg, #a66d00, #ffe59a, #c49018, #fff4b3) 1;
}

.target-grid article.is-silver::after
{
    border-image: linear-gradient(135deg, #778594, #f6f8fb, #9ba9b6, #f4f6f8) 1;
}

.player-bfl-grid p
{
    min-height: 34px;
    margin: 3px 0 0;
    color: #40505e;
    font-size: 12px;
    line-height: 1.35;
}

.player-bfl-grid article.is-maxed
{
    position: relative;
}

.player-bfl-grid article.is-maxed::after
{
    content: "";
    position: absolute;
    inset: 0;
    border: 3px solid;
    border-image: conic-gradient(#ff4d4d, #ffa63d, #fff167, #46d96c, #4ac7ff, #9071ff, #f06ece, #ff4d4d) 1;
    pointer-events: none;
}

html[data-theme="dark"] .site-footer
{
    color: #eaf4fb;
    background: #0d1720;
}

html[data-theme="dark"] .site-footer a
{
    color: #fff;
}

html[data-theme="dark"] .site-header nav > a.submit-event-link, html[data-theme="dark"] .submit-button
{
    color: #fff;
    background: #e91e82;
    border-color: #a70b58;
}

html[data-theme="dark"] .player-summary article.is-invite-tie
{
    background: #4b3561;
}

html[data-theme="dark"] .player-summary article.is-invite-tie strong
{
    color: #eed9ff;
}

html[data-theme="dark"] .player-summary article.is-ace-trainer
{
    background: linear-gradient(var(--paper), var(--paper)) padding-box, conic-gradient(#ff4d4d, #ffa63d, #fff167, #46d96c, #4ac7ff, #9071ff, #f06ece, #ff4d4d) border-box;
}

html[data-theme="dark"] .invite-badge.is-invite-tie
{
    color: #eed9ff;
    background: #4b3561;
}

html[data-theme="dark"] .invite-badge.is-travel-award-tie
{
    color: #fff0b2;
    background: #68511c;
}

html[data-theme="dark"] .invite-badge.is-travel-stipend-tie
{
    color: #d7efff;
    background: #1d506e;
}

html[data-theme="dark"] .player-targets, html[data-theme="dark"] .player-bfls, html[data-theme="dark"] .target-grid article, html[data-theme="dark"] .player-bfl-grid article
{
    background: var(--paper);
}

html[data-theme="dark"] .player-bfls > header > span, html[data-theme="dark"] .target-grid span, html[data-theme="dark"] .player-bfl-grid span, html[data-theme="dark"] .target-grid small, html[data-theme="dark"] .player-bfl-grid small, html[data-theme="dark"] .player-bfl-grid p, html[data-theme="dark"] .player-summary small
{
    color: var(--muted);
}

/* Worlds race and player rank chart */

.timeline-key.is-major
{
    background: #e5b13b;
}

.race-controls
{
    padding: 15px;
    border-bottom: 1px solid var(--line);
}

.race-buttons
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.race-buttons button
{
    min-height: 34px;
}

.race-buttons [data-race-action="play"]
{
    flex: 0 0 11rem;
    width: 11rem;
    white-space: nowrap;
}

.race-buttons button:disabled
{
    opacity: .45;
    cursor: default;
}

.race-buttons button:disabled:hover
{
    color: #fff;
    background: var(--blue);
    border-color: var(--blue-deep);
}

.race-limit, .race-speed
{
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}

.race-limit
{
    margin-left: auto;
}

.race-limit select, .race-speed select
{
    min-height: 34px;
    padding: 4px 7px;
}

.race-label
{
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.race-slider input
{
    display: block;
    width: 100%;
    margin: 7px 0 0;
    accent-color: var(--blue);
    cursor: pointer;
}

.race-marks
{
    position: relative;
    height: 16px;
    margin: 0 9px;
}

.race-major-mark
{
    position: absolute;
    top: 2px;
    width: 10px;
    min-width: 10px;
    height: 10px;
    min-height: 10px;
    border: 1px solid #77500b;
    border-radius: 0;
    background: #e5b13b;
    box-shadow: none;
    padding: 0;
    transform: translateX(-50%) rotate(45deg);
}

.race-major-mark:hover, .race-major-mark.is-selected
{
    border-color: #674100;
    background: #ffdc70;
}

.race-event
{
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--line);
}

.race-event > div
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.race-event a
{
    color: var(--ink);
    font-size: 17px;
    font-weight: 700;
}

.race-event a:hover
{
    color: var(--green);
}

.race-major, .race-unconfirmed
{
    display: inline-flex;
    padding: 2px 6px;
    border: 1px solid #b78c21;
    color: #694b00;
    background: #ffefbc;
    font-size: 10px;
    letter-spacing: .03em;
}

.race-unconfirmed
{
    border-color: #5f6871;
    color: #39434c;
    background: #e8edf0;
}

.race-major[hidden], .race-unconfirmed[hidden], .race-empty[hidden], .chart-tooltip[hidden]
{
    display: none;
}

.race-list
{
    position: relative;
    margin: 12px 15px 15px;
    transition: height var(--race-move-duration, .9s) ease;
}

.race-row
{
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 42px;
    display: grid;
    grid-template-columns: 36px minmax(170px, 300px) minmax(0, 1fr) 68px;
    align-items: center;
    gap: 8px;
    transition: transform var(--race-move-duration, .9s) cubic-bezier(.22, .61, .36, 1), opacity .35s ease;
}

.race-row.is-leaving
{
    pointer-events: none;
}

.race-rank
{
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

.race-name-group
{
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 4px;
}

.race-name
{
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.race-name:hover
{
    color: var(--green);
    text-decoration: underline;
}

.race-badges
{
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 3px;
}

.race-badge
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 19px;
    border-radius: 3px;
    padding: 1px 4px;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.race-badge[hidden]
{
    display: none;
}

.race-movement.is-up, .race-auto-badge
{
    background: #078040;
}

.race-movement.is-down
{
    background: #bd3037;
}

.race-first
{
    min-width: 19px;
    background: #285caa;
}

.race-region
{
    color: #24445f;
    background: #d8edf9;
}

.race-track
{
    overflow: hidden;
    height: 26px;
    background: #ecf0f1;
}

.race-bar
{
    height: 100%;
    min-width: 2px;
    background: #a9b9c3;
    transition: width var(--race-move-duration, .9s) cubic-bezier(.22, .61, .36, 1), background-color .3s ease;
}

.race-bar.is-auto
{
    background: #45c973;
}

.race-bar.is-invite
{
    background: #a2e8b3;
}

.race-bar.is-out
{
    background: #a9b9c3;
}

.race-points
{
    color: var(--ink);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.race-empty
{
    margin: 0;
    padding: 18px 15px;
    color: var(--muted);
}

.chart-legend
{
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px 14px;
}

.chart-key.is-auto i
{
    border-top: 3px solid #058741;
}

.chart-scroll
{
    padding: 16px 10px 0;
}

.rank-chart
{
    width: 100%;
    height: auto;
}

.chart-grid
{
    stroke: #cbd1d1;
    stroke-width: 1;
}

.chart-label, .chart-date
{
    fill: #59666f;
    font-size: 12px;
}

.rank-line
{
    stroke: #205786;
    stroke-width: 3;
}

.rank-line.is-auto
{
    stroke: #058741;
}

.score-node
{
    cursor: pointer;
    outline: none;
}

.chart-hit-area
{
    fill: transparent;
}

.score-point
{
    fill: var(--paper);
    stroke: #205786;
    stroke-width: 2.5;
}

.score-node.is-auto .score-point
{
    stroke: #058741;
}

.score-node:focus-visible .score-point
{
    stroke-width: 4;
}

.small-point
{
    fill: #205786;
}

.small-point.is-auto
{
    fill: #058741;
}

.chart-tooltip
{
    position: fixed;
    z-index: 100;
    max-width: min(330px, calc(100vw - 16px));
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 3px 3px 0 rgba(25, 59, 98, .2);
    padding: 10px 12px;
    pointer-events: none;
}

.chart-tooltip strong
{
    color: var(--ink);
    font-size: 14px;
}

.chart-tooltip span
{
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

html[data-theme="dark"] .race-major
{
    color: #fff1c0;
    background: #655016;
}

html[data-theme="dark"] .race-unconfirmed
{
    border-color: #72808b;
    color: #e2e8ed;
    background: #3b454d;
}

html[data-theme="dark"] .race-region, html[data-theme="dark"] .player-region-badge
{
    border-color: #5c829d;
    color: #d8efff;
    background: #1c4058;
}

html[data-theme="dark"] .race-track
{
    background: #2a3137;
}

html[data-theme="dark"] .race-bar.is-auto
{
    background: #39bd75;
}

html[data-theme="dark"] .race-bar.is-invite
{
    background: #477b5a;
}

html[data-theme="dark"] .race-bar.is-out
{
    background: #687984;
}

html[data-theme="dark"] .chart-grid
{
    stroke: #53616b;
}

html[data-theme="dark"] .rank-line
{
    stroke: #88cff6;
}

html[data-theme="dark"] .rank-line.is-auto
{
    stroke: #42d982;
}

html[data-theme="dark"] .score-point
{
    stroke: #88cff6;
}

html[data-theme="dark"] .score-node.is-auto .score-point
{
    stroke: #42d982;
}

html[data-theme="dark"] .small-point
{
    fill: #88cff6;
}

html[data-theme="dark"] .small-point.is-auto
{
    fill: #42d982;
}

@media (max-width: 620px)
{
    .race-limit
    {
        margin-left: 0;
    }

    .race-row
    {
        grid-template-columns: 28px minmax(130px, 185px) minmax(0, 1fr) 48px;
        gap: 5px;
    }

    .race-name, .race-points
    {
        font-size: 12px;
    }

    .race-list
    {
        margin-left: 8px;
        margin-right: 8px;
    }

    .chart-head
    {
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce)
{
    .race-list, .race-row, .race-bar
    {
        transition: none;
    }
}

@media (max-width: 880px)
{
    .player-summary
    {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .target-grid, .player-bfl-grid
    {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .import-actions
    {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px)
{
    .site-footer
    {
        align-items: stretch;
        flex-direction: column;
        gap: 5px;
    }

    .player-summary, .target-grid, .player-bfl-grid
    {
        grid-template-columns: 1fr;
    }

    .player-targets > header, .player-bfls > header
    {
        align-items: flex-start;
        flex-direction: column;
    }
}

html[data-theme="dark"] .race-buttons button:not(:hover), html[data-theme="dark"] .race-buttons button:disabled
{
    color: #10233d;
}

.header-inner
{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.header-top
{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.site-header .main-nav
{
    justify-content: flex-start;
}

.site-header .header-tools
{
    justify-content: flex-end;
    gap: 5px;
}

.site-header .header-tools > a, .site-header .header-tools button
{
    min-height: 24px;
    padding: 2px 5px;
    font-size: 10px;
    line-height: 1.1;
}

.result-team-cell
{
    min-width: 230px;
}

.result-team-icons
{
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
}

.result-team-icons img
{
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.event-feedback
{
    display: inline-block;
    color: var(--green);
    font-size: 12px;
    margin-left: 6px;
}

.event-feedback.error
{
    color: var(--red);
}

.team-editor
{
    margin-top: 3px;
}

.team-editor summary
{
    cursor: pointer;
    color: var(--blue-deep);
    font-size: 12px;
}

.player-result-action
{
    display: block;
    margin-top: 6px;
}

.player-result-button
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border: 1px solid var(--line);
    color: var(--ink);
    background: #eef2f5;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.player-result-button:hover
{
    color: #fff;
    background: var(--green);
    border-color: #005e2e;
}

.team-editor summary.player-result-button
{
    color: var(--ink);
    list-style: none;
}

.team-editor summary.player-result-button::-webkit-details-marker
{
    display: none;
}

.team-editor form
{
    margin-top: 6px;
    min-width: 185px;
}

.team-editor form input
{
    min-width: 0;
}

html[data-theme="dark"] .team-editor summary
{
    color: #a9d8ff;
}

html[data-theme="dark"] .player-result-button, html[data-theme="dark"] .team-editor summary.player-result-button
{
    color: var(--ink);
    background: #272e35;
}

html[data-theme="dark"] .header-tools > a:not(.is-current):not(.admin-link), html[data-theme="dark"] .header-tools .theme-toggle
{
    color: var(--ink);
    background: #272e35;
}

@media (max-width: 620px)
{
    .header-top
    {
        flex-wrap: wrap;
    }

    .site-header .header-tools
    {
        margin-left: auto;
    }
}

.header-inner
{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "brand tools"
        "nav nav";
    align-items: center;
    gap: 8px 20px;
}

.header-top, .site-menu
{
    display: contents;
}

.brand
{
    grid-area: brand;
}

.site-header .header-tools
{
    grid-area: tools;
}

.site-header .main-nav
{
    grid-area: nav;
}

.menu-toggle
{
    display: none;
}

@media (max-width: 620px)
{
    .header-inner
    {
        grid-template-areas:
            "brand toggle"
            "menu menu";
        gap: 8px;
    }

    .menu-toggle
    {
        display: inline-flex;
        grid-area: toggle;
        min-height: 34px;
        padding: 5px 8px;
        font-size: 12px;
        white-space: nowrap;
    }

    .site-menu
    {
        display: none;
        grid-area: menu;
        flex-direction: column;
        gap: 8px;
        padding-top: 8px;
        border-top: 1px solid var(--line);
    }

    .site-menu.is-open
    {
        display: flex;
    }

    .site-header .main-nav
    {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        order: 1;
    }

    .site-header .header-tools
    {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        margin-left: 0;
        order: 2;
    }

    .site-header .main-nav > a, .site-header .main-nav > span, .site-header .header-tools > a, .site-header .header-tools .nav-form, .site-header .header-tools .theme-toggle
    {
        width: 100%;
        min-height: 37px;
        justify-content: center;
        padding: 7px 8px;
        font-size: 12px;
    }

    .site-header .header-tools .nav-form button
    {
        width: 100%;
        min-height: 37px;
        padding: 7px 8px;
        font-size: 12px;
    }

    .standings-table .player-name
    {
        min-width: 260px;
        padding-left: 12px;
        padding-right: 10px;
        white-space: normal;
    }

    .standings-table .total-col
    {
        display: table-cell;
        width: 54px;
        padding-left: 8px;
        padding-right: 8px;
    }
}

@media (max-width: 620px)
{
    .site-header .main-nav > .submit-event-link
    {
        grid-column: 1 / -1;
    }

    .site-header .header-tools
    {
        grid-template-columns: 1fr;
    }
}
