*,
*:before,
*:after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-gray-background: #F9F9F9;
    --color-gray-border: #dedede;
    --font-size-xs: .75rem;
    --font-size-sm: .875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.25rem;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 600;
    --padding: .75rem;
    --shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.025) 0px 1px 2px 0px;
    --td-height: 1.75rem;
}

@media screen and (min-width: 40rem) {
    :root {
        --padding: 1.5rem;
    }
}

[v-cloak] {
    display: none;
}

b {
    font-weight: var(--font-weight-bold);
}

a {
    color: currentColor;
    text-decoration: none;
}

svg {
    width: 1rem;
    height: 1rem;
}

select {
    border: none;
    background: white;
    padding: .25rem .5rem;
    font: inherit;
    appearance: none;
    border-radius: .5rem;
    box-shadow: var(--shadow);
    cursor: pointer;
}

button,
.button {
    border: none;
    background: rgba(0, 0, 0, .1);
    color: #000;
    cursor: pointer;
    font-size: var(--font-size-sm);
    height: 2.5rem;
    padding: .5rem 1rem;
    border-radius: .5rem;
    gap: .5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-normal);
}

.button[data-theme="success"],
button[data-theme="success"] {
    background: lightgreen;
}

.button[data-theme="notice"],
button[data-theme="notice"] {
    background: peachpuff;
}

.button[data-theme="error"],
button[data-theme="error"] {
    background: lightcoral;
}

.button[data-width="100"],
button[data-width="100"] {
    flex-basis: 100%;
}

body {
    background: darkblue;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

html {
    font-family: system-ui, sans-serif;
}

th {
    border-bottom: 1px solid var(--color-gray-border);
    font-weight: var(--font-weight-medium);
    padding: .325rem .5rem;
    background: var(--color-gray-background);
}

table {
    width: 100%;
    border-spacing: 0;
    overflow: hidden;
    table-layout: fixed;
    background: white;
    max-width: 100%;
    font-variant-numeric: tabular-nums;
    font-size: var(--font-size-xs);
    line-height: 1;
}

table td,
table th {
    padding: 0 .325rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid var(--color-gray-border);
    text-align: left;
    font-size: var(--font-size-xs);
    height: var(--td-height);
    vertical-align: center;
}

table th a,
table td a {
    color: darkblue;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    min-width: 0;
    padding: 0 .325rem;
    height: var(--td-height);
    outline-offset: -2px;
    align-items: center;
    display: flex;
}

table th:has(a),
table td:has(a) {
    padding: 0 !important;
}

/* alignments */
table .position,
table .points,
table .pointsTotal,
table .checkpoints {
    text-align: right;
}
table .qualified,
table .group,
table .gender,
table .group,
table .status,
table .stopwatch {
    text-align: center;
}

table .position {
    width: 1.625rem;
    padding-left: 0;
    padding-right: .325rem;
    border-right: 1px solid var(--color-gray-border);
}

table .points,
table .pointsTotal,
table .lk,
table .ak,
table .gender,
table .time,
table .checkpoints,
table .qualified,
table .status,
table .stopwatch,
table .group {
    width: 1.8rem;
    padding: 0 .325rem;
    border-left: 1px solid var(--color-gray-border);
}

table .lk {
    width: 2.375rem;
}

table .ak {
    width: 3.75rem;
}

table .qualified,
table .group {
    width: 1.5rem;
}

table .time {
    width: 4.5rem;
}

table .pointsTotal {
    width: 2.25rem;
}

table .checkpoints {
    width: 2.9rem;
}

table .stopwatch a {
    display: flex;
    padding: 0;
    height: 100%;
    width: 1.8rem;
    justify-content: center;
    align-items: center;
}

.box {
    border-radius: .5rem;
    background: white;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.box header {
    background: var(--color-gray-background);
    border-bottom: 1px solid var(--color-gray-border);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-xs);
    height: var(--td-height);
}
.box header h3 {
    font-size: 1em;
    font-weight: var(--font-weight-medium);
}
.box header h3 a {
    color: darkblue;
    display: flex;
    align-items: center;
    height: var(--td-height);
}
.box header h3 > * {
    display: block;
    padding: 0 .5rem;
    height: var(--td-height);
}

.ranking {
    overflow-x: auto;
}

.ranking table {
    min-width: 30rem;
}

.header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    row-gap: .5rem;
    padding: .75rem var(--padding);
    background: darkblue;
    color: white;
    flex-shrink: 0;
}

.header menu {
    display: flex;
    gap: 1rem;
    font-size: var(--font-size-sm);
}

.header menu a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
    text-decoration-color: rgba(255, 255, 255, .5);
}

.logo {
    font-weight: var(--font-weight-bold);
    border-bottom: 2px solid rgba(255, 255, 255, .2);
    width: 100%;
    padding-bottom: .5rem;
}

@media screen and (min-width: 40rem) {
    .logo {
        border-bottom: none;
        padding-bottom: 0;
        width: auto;
    }
}

h1 {
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
    margin-bottom: 1.5rem;
}

h2 {
    font-weight: var(--font-weight-normal);
    font-size: var(--font-size-md);
    margin-bottom: .75rem;
}

h3 {
    font-weight: var(--font-weight-normal);
    font-size: var(--font-size-md);
}

.section {
    container-type: inline-size;
}

.section+.section {
    margin-top: calc(var(--padding) * 2);
}

main {
    padding: var(--padding);
    background: #efefef;
    flex-grow: 1;
    container-type: inline-size;
}

.underline {
    text-decoration: underline;
}

.info {
    display: grid;
    grid-template-columns: 9rem 1fr;
    font-size: var(--font-size-xs);
}

.info dt {
    background: var(--color-gray-background);
    border-right: 1px solid var(--color-gray-border);
    font-weight: var(--font-weight-medium);
}

.info dt,
.info dd {
    border-bottom: 1px solid var(--color-gray-border);
    padding: .325rem .5rem;
}

.info a {
    color: darkblue;
}

.info dt:last-of-type,
.info dd:last-of-type {
    border-bottom: 0;
}


@media print {

    body {
        background: white;
    }

    main {
        padding: 0;
        background: white;
    }

    .header {
        display: none;
    }

    .box {
        box-shadow: none;
        border-radius: 0;
        border: 1px solid var(--color-gray-border);
        overflow: visible;
    }

    table {
        --td-height: 1.25rem;
    }
}
