:root {
    --row-height: 0;
    --sep-height: 0;
}
@media screen and (min-width: 768px) {

    .finals-count-4 .sep-item {
        height: 60px;
    }

    .finals-count-4 .sep-item_2 {
        height: 220px;
    }

    .finals-count-3 .sep-item_1 {
        height: 68px;
    }
    .finals-count-3 .sep-item_1.sep-item__command {
        height: 136px;
    }

    .finals-count-5 .sep-item_1 {
        height: 64px;
    }

    .finals-count-5 .sep-item_2 {
        height: 210px;
    }

    .finals-count-5 .sep-item_3 {
        height: 500px;
    }

	.winner-row {
		padding-left: 15px;
        margin-top: 1em;
		margin-left:0;
		width: 97%;
		box-sizing: border-box;
	}

    winner-row.winner-row_preheat {
        margin-left: 40px;
        width: calc(97% - 40px)
    }

    .finals-grid {
        overflow-x: auto;
        font-size: 12px;
        --row-height: 2em;
    }
    .finals-grid.command {
        --row-height: 3em;
    }

    .finals-grid.row {
        margin-left: 0;
        margin-right: 0;
        padding-left: 1px;
    }

    .finals-grid.row > div {
        flex-shrink: 0;
        padding: 0;
    }

    .finals-grid.row .finals-count-2 {
        padding: 0;
    }
    .finals-grid.row .fin-col-7 {
        padding-left: 1em;
    }


    .finals-grid.row .finals-count-2.fin-col-7,
    .finals-grid.row .finals-count-3.fin-col-7 {
        margin-top: 5em;
    }

    .finals-grid .final-subtitle {
        margin-top: 1em;
    }

    .finals-grid table {
        margin-bottom: 0;
    }

    .finals-grid table thead tr,
    .finals-grid.command table thead tr {
        height: 2em;
    }
    .finals-grid table tr {
        height: var(--row-height);
    }

    .finals-grid .final-item {
        margin: 0;
    }

    .finals-grid .race {
        display: flex;
    }
    .finals-grid .connector {
        display: flex;
        padding-top: calc(2em + var(--row-height));
    }
    .sbx.finals-grid .connector {
        padding-top: calc(2em + var(--row-height) * 2);
    }

    .finals-grid .connector .line,
    .finals-grid .connector .merger {
        box-sizing: border-box;
        width: 2em;
    }
    .finals-grid .connector .line {
        border-bottom: thin solid #c0c0c8;
    }
    .finals-grid .connector .merger {
        position: relative;
    }
    .finals-grid .connector .merger:before,
    .finals-grid .connector .merger:after {
        content: "";
        display: block;
        box-sizing: border-box;
        width: 100%;
        height: 50%;
        border: 0 solid #c0c0c8;
    }
    .finals-grid .connector .merger:before {
        border-right-width: thin;
        border-top-width: thin;
    }
    .finals-grid .connector .merger:after {
        border-right-width: thin;
        border-bottom-width: thin;
    }

    .finals-grid .fin-col:not(.fin-col-7) .final-item:not(:last-child),
    .finals-grid .fin-col:not(.fin-col-7) .race:not(:last-child) {
        margin-bottom: var(--sep-height);
    }
    .finals-grid .fin-col:not(.fin-col-7):first-child {
        --sep-height: 2em;
    }
    .finals-grid .fin-col:not(.fin-col-7):nth-child(2) {
        --sep-height: 10em;
    }
    .finals-grid.command .fin-col:not(.fin-col-7):nth-child(2) {
        --sep-height: 12em;
    }
    .finals-grid.sbx .fin-col:not(.fin-col-7):nth-child(2) {
        --sep-height: 14em;
    }
    .finals-grid.sbx.command .fin-col:not(.fin-col-7):nth-child(2) {
        --sep-height: 18em;
    }
    .finals-grid .fin-col:not(.fin-col-7):nth-child(3) {
        --sep-height: 26em;
    }
    .finals-grid.command .fin-col:not(.fin-col-7):nth-child(3) {
        --sep-height: 32em;
    }
    .finals-grid.sbx .fin-col:not(.fin-col-7):nth-child(3) {
        --sep-height: 38em;
    }
    .finals-grid.sbx.command .fin-col:not(.fin-col-7):nth-child(3) {
        --sep-height: 50em;
    }
    .finals-grid .fin-col:not(.fin-col-7):nth-child(4) {
        --sep-height: 58em;
    }
    .finals-grid.command .fin-col:not(.fin-col-7):nth-child(4) {
        --sep-height: 72em;
    }
    .finals-grid .finals-count-2.fin-col:not(.fin-col-7) {
        --sep-height: 18em;
    }

    .finals-grid .fin-col .connector {
        --merger-height: calc(2em + var(--row-height) * 2 + var(--sep-height));
    }
    .finals-grid.sbx .fin-col .connector {
        --merger-height: calc(2em + var(--row-height) * 4 + var(--sep-height));
    }
    .finals-grid .fin-col .connector .merger {
        height: var(--merger-height);
    }
    .finals-grid .fin-col .connector .line {
        height: calc(var(--merger-height) / 2);
    }
}
