:root {
    color-scheme: light;
    --ink: #1d1d1f;
    --muted: #6e6e73;
    --paper: #fff;
    --surface: #fff;
    --line: #e5e5e7;
    --accent: #315b4a;
    --accent-dark: #234234;
    --bs-body-bg: var(--paper);
    --bs-body-color: var(--ink);
    --bs-body-font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bs-link-color: #234b69;
    --bs-link-hover-color: #102f47;
}

body {
    background: var(--paper);
    color: var(--ink);
    font: 1rem/1.6 var(--bs-body-font-family);
}

a {
    text-underline-offset: .18em;
}

a:focus-visible, summary:focus-visible {
    outline: 3px solid #bd6e22;
    outline-offset: 3px;
}

.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.site-header > .container-fluid {
    padding-block: 1rem;
}

.brand {
    color: var(--ink);
    font-size: 1.2rem;
    font-weight: 750;
    text-decoration: none;
}

.site-header nav a {
    font-weight: 650;
}

.page {
    min-height: 70vh;
    margin-block: 2rem 4rem;
}

.home-page {
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    min-height: 100vh;
    min-height: 100svh;
}

.home-page .site-header {
    align-self: start;
}

.home-page .page {
    min-height: 0;
    margin-block: 0;
    padding-block: 2rem;
}

.home-countdown {
    text-align: center;
}

.home-countdown p:last-child {
    margin-bottom: 0;
}

.hero {
    max-width: 52rem;
    margin: 4rem auto;
    text-align: center;
}

.hero .card-body {
    padding: clamp(1.5rem, 5vw, 4rem);
}

.hero h1 {
    margin: .2rem 0 1rem;
    font: 700 clamp(2.4rem, 8vw, 5rem)/1.1 Georgia, serif;
}

.eyebrow {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.event-date {
    font-size: 1.3rem;
    font-weight: 650;
}

.event-venue, .muted {
    color: var(--muted);
}

.countdown-label {
    margin: 2rem 0 .4rem;
    color: var(--muted);
}

.countdown {
    margin: 0;
    font: 700 min(6.4rem, 9vw)/1.3 ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}

.page-heading {
    margin-bottom: 2rem;
}

h1, h2, h3 {
    line-height: 1.2;
}

h1, h2 {
    font-family: Georgia, "Times New Roman", serif;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
}

h3 {
    font-family: var(--bs-body-font-family);
    font-weight: 600;
    letter-spacing: -.025em;
}

h2 {
    font-size: clamp(1.25rem, 3vw, 1.8rem);
}

h3 {
    font-size: 1.15rem;
}

.btn-success {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--accent-dark);
    --bs-btn-hover-border-color: var(--accent-dark);
    --bs-btn-active-bg: var(--accent-dark);
    --bs-btn-active-border-color: var(--accent-dark);
}

.notice {
    border-left: .3rem solid #a87c1c;
}

.card {
    overflow: hidden;
    background: var(--surface);
    border-color: var(--line);
    border-radius: .8rem;
}

.card-body {
    padding: 1.2rem;
}

.card h2 {
    margin-top: 0;
}

.card p {
    margin: .35rem 0;
}

.map-preview {
    display: block;
    background: var(--paper);
}

.map-preview img {
    aspect-ratio: 1.35;
    object-fit: contain;
}

.map-preview img, .map-frame img {
    filter: sepia(.18);
}

.map-section, .content-section {
    margin: 2.5rem 0;
}

.game-layout {
    display: grid;
    gap: 2rem;
    margin-block: 2.5rem;
    align-items: stretch;
}

.game-maps {
    min-width: 0;
}

.game-layout .map-section, .game-layout .content-section {
    margin: 0;
}

.game-maps .map-section + .map-section {
    margin-top: 2rem;
}

.map-frame {
    overflow: hidden;
    background: #fff;
}

.map-frame img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 100svh;
    object-fit: contain;
}

.players-panel {
    min-width: 0;
}

.players-panel h3 {
    font-size: .9rem;
}

.player-standings {
    font-size: .875rem;
}

.player-standings th, .player-standings td {
    padding: .35rem .3rem;
    vertical-align: middle;
}

.player-standings th:first-child, .player-standings td:first-child,
.player-standings tbody th, .player-standings td:last-child {
    white-space: nowrap;
}

.player-standings thead th:last-child {
    max-width: 6rem;
    white-space: normal;
}

.player-standings td:first-child, .player-standings td:last-child {
    font-variant-numeric: tabular-nums;
}

.power-dot {
    display: inline-block;
    width: .68rem;
    height: .68rem;
    margin-right: .25rem;
    border: 1px solid rgb(0 0 0 / 25%);
    border-radius: 50%;
    background-color: #888;
    vertical-align: .02rem;
}

.power-dot[data-power="AUSTRIA"] { background-color: #c48f85; }
.power-dot[data-power="ENGLAND"] { background-color: #db6b9a; }
.power-dot[data-power="FRANCE"] { background-color: #85add6; }
.power-dot[data-power="GERMANY"] { background-color: #5f5f5f; }
.power-dot[data-power="ITALY"] { background-color: forestgreen; }
.power-dot[data-power="RUSSIA"] { background-color: #824ea2; }
.power-dot[data-power="TURKEY"] { background-color: #c7b52b; }

.power-players {font-weight: normal;}

summary {
    cursor: pointer;
    font-weight: 700;
}

.table {
    --bs-table-bg: var(--surface);
}

.table > :not(caption) > * > * {
    vertical-align: top;
}

.mobile-only {
    display: none;
}

@media (max-width: 47.999rem) {
    .mobile-cards, .mobile-cards tbody {
        display: block;
        width: 100%;
    }

    .mobile-cards thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .mobile-cards tbody tr {
        display: flex;
        flex-direction: column;
        margin-bottom: 1rem;
        padding: 1rem;
        border: 1px solid var(--line);
        border-radius: .8rem;
    }

    .mobile-cards tbody th, .mobile-cards tbody td {
        display: block;
        padding: .3rem 0;
        border: 0;
        overflow-wrap: anywhere;
    }

    .mobile-cards [data-label]::before {
        content: attr(data-label) ": ";
        color: var(--muted);
        font-size: .875rem;
        font-weight: 400;
    }

    .mobile-cards .mobile-card-title {
        font-weight: 700;
    }

    .mobile-cards .mobile-card-title::before {
        content: none;
    }

    .mobile-cards .mobile-only {
        display: inline;
    }

    .mobile-cards .mobile-card-date {
        display: block;
        color: var(--muted);
        font-size: .875rem;
        font-weight: 400;
    }

    .mobile-cards .desktop-only {
        display: none;
    }

    .participation-table .participation-result {
        order: 1;
    }

    .participation-table .participation-power {
        order: 2;
    }

    .participation-table .participation-score {
        order: 3;
    }

    .players-directory tbody tr {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .5rem 0;
        margin-bottom: .5rem;
        padding: .65rem .8rem;
        border-radius: .5rem;
        box-shadow: 0 1px 3px rgb(0 0 0 / 5%);
    }

    .players-directory tbody th, .players-directory tbody td {
        padding: 0;
    }

    .players-directory .mobile-card-title {
        grid-column: 1 / -1;
    }

    .players-directory .badge {
        margin-left: .5rem;
        font-weight: 500;
    }

    .players-directory .player-stat {
        min-width: 0;
        padding-inline: .5rem;
        font-size: 1.4rem;
        font-weight: 700;
        font-variant-numeric: tabular-nums;
        line-height: 1.4;
        text-align: left;
        overflow-wrap: normal;
    }

    .players-directory .player-stat + .player-stat {
        border-left: 1px solid var(--line);
    }

    .players-directory .player-stat::before {
        content: none;
    }

    .players-directory .player-stat::after {
        display: block;
        content: attr(data-label);
        color: var(--muted);
        font-size: .8rem;
        font-weight: 400;
    }
}

.result {
    font-weight: 700;
}

.result-summary dt {
    color: var(--muted);
    font-size: .9rem;
}

.result-summary dd {
    margin: .2rem 0 0;
    font-size: 1.4rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.calendar-event {
    position: relative;
}

.calendar-event__badge {
    margin-bottom: .75rem;
}

.calendar-event h2, .calendar-event p {
    margin: .2rem 0;
}

.calendar-event--completed {
    background: #f2f2f2;
    border-color: #d7d7d7;
    color: #777;
}

.calendar-event--completed a {
    color: #666;
}

.calendar-event__result {
    position: absolute;
    top: .85rem;
    left: 1.2rem;
    max-width: calc(100% - 2.4rem);
    padding: .2rem .55rem;
    border-radius: .35rem;
    background: #777;
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
}

@media (min-width: 62rem) {
    .game-layout {
        grid-template-columns: minmax(0, 3fr) minmax(18rem, 2fr);
    }
}

@media (max-width: 36rem) {
    .page {
        margin-top: 1.2rem;
    }

    .hero {
        margin-block: 2rem;
    }
}
