@import "inc/reset.css";
@import "inc/title.css";
@import "inc/video.css";
@import "inc/nav";
@import "inc/quicklinks";
@import "inc/checkbox";
@import "inc/button group";
@import "inc/more button";

html, body {
    height: 100%;
}

body {
    color: #c7d5e0;
    background: #1b2838;
    font: 95%/1.4 Inter, sans-serif;
    font-optical-sizing: auto;
}
@media (max-width: 380px) {
    body {
        font-size: 4vw;
        line-height: 1.3;
    }
}

#page {
    /* Must match body. */
    background: #1b2838;

    /* Sticky footer. */
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

a {
    color: #cfad74;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
a:visited {
    color: #9e814c;
}

h2 {
    margin-bottom: .7em;

    font-size: 110%;
    font-weight: bold;
    color: #c5d6e0;
}

#header {
    overflow: hidden;
    flex-shrink: 0;

    background: radial-gradient(25% 45% at center 60%, #212329, #171a21);
}
#header, #footer {
    background-color: #171a21;
}

#user {
    position: relative;
    z-index: 2;
    height: var(--user-height);
    margin-bottom: max(-2vw, calc(var(--user-height) * -1 - 1px));
    padding: 6px;

    text-align: right;
    font-size: 85%;

    --user-height: 37px;
}

/* Search */
#user > form {
    display: inline-block;
}
#user > form input[type=search] {
    color: #97a5cf;
    border: 0 solid #97a5cf;
    background: transparent;
    max-width: 0;

    transition: border-width .05s, max-width .2s;

    /* Firefox UA validation style override. */
    box-shadow: none;
    /* Chrome UA focus style override. */
    outline: none;
}
#user > form input[type=search]:focus,
#user > form input[type=search]:valid {
    max-width: 10em;

    border-bottom-width: 2px;
}
#user > form > label > span {
    display: inline-block;
    width: 15px;
    height: 15px;
    padding: 0 .25em;
    overflow: hidden;
    text-indent: 200%;
    vertical-align: middle;

    background: url('/svg/search.svg') no-repeat center;
}

#user .avatar {
    display: inline-block;
    width: 32px;
    height: $width;
    padding: 1px;
    margin: 0 .5em;
    line-height: 0;
    vertical-align: middle;

    background: #3f7085;
    border: 1px solid #4c92ae;

    >img {
        width: 100%;
    }
}
#user button {
    margin: 0 .5em;
    padding: .3em .6em .4em;
    border: 1px solid #575a80;
    line-height: 1;

    color: #97a5cf;
    border-radius: 4px;
    cursor: pointer;
}
#user button:hover {
    background-color: #272a31;
}
#lin, #lout {
    display: none;
}
.lout #lout, .lin #lin {
    display: inline-block;
    line-height: var(--user-height);
}
#user #login {
    padding-left: calc(.6em + 14px);

    background: url('/svg/steam.svg') no-repeat 6px 45%;
    background-size: 14px 11px;
}

p {
    margin: 1.5em auto;

    text-align: justify;
}
p > img {
    float: right;
    max-width: 23%;
    min-width: 150px;
    margin: 0 0 .5em 1em;
    opacity: .85;
}

em {
    font-style: italic;
}

strong, b {
    font-weight: bold;
}

mark, b {
    color: #70c3ff;
    background-color: transparent;
}

dl {
    display: inline-block;
}
dt, dd {
    display: inline;
}
dt {
    font-weight: bold;
}

fieldset {
    margin: 1em .9em;
    padding: 1em;

    border: 1px solid #395e7b;
    border-radius: 3px;
}
legend {
    margin-left: -.3em;
    padding: 0 .3em;

    font-size: 60%;
    text-transform: uppercase;
}

a.owned {
    position: relative;
    display: inline-block;
}
a.owned > img {
    opacity: .3;
}
a.owned {
    &:before {
        content: attr(data-content);
        position: absolute;
        display: block;
        z-index: 1;
        left: 0;
        top: 50%;
        max-width: 0;
        height: 18px;
        line-height: 19px;
        padding-left: 18px;
        margin-top: -9px;
        overflow: hidden;
        white-space: nowrap;
        pointer-events: none;

        color: #111;
        background: #4F95BD url('/svg/burger.svg') no-repeat 5px 50%;
        background-size: 8px 8px;
        font-size: 8pt;
        text-transform: uppercase;
        transition: max-width .3s, padding .2s;
    }

    &[data-content="0 minutes"]:before {
        background-color: #ba6363;
    }
}
a.owned:hover:before {
    max-width: 100%;
    padding-right: 5px;
}

b.deck-v {
    color: #59bf40;
}
b.deck-p {
    color: #ffc82c;
}

.slogan {
    padding-bottom: .9em;

    font: calc(6px + 1vw)/.8 Codystar;
    color: #b3b5bd;
    text-shadow: 0 0 0 #b3b5bd, 0 0 3px #989976, 1px 1px 0 #000;
    text-transform: uppercase;
    text-align: center;
}
@media (min-width: 1300px) {
    .slogan {
        font-size: 19px;
    }
}
.d {
    font-size: 80%;
}

.countdown {
    position: absolute;
    padding: .5em .7em;
    top: 0;
    right: 50%;
    transform: translate(50%, 0);

    color: #919599;
    background: #171b22;
    border: 1px solid #22344b;
    border-top-width: 0;
    border-left-width: 0;
    border-radius: 0 0 3px 3px;
    font: italic 75%/.8 Cousine;
    text-transform: uppercase;
}
.countdown > span {
    color: #9fa6b3;
}
.countdown.ready, .countdown.ready > a {
    animation: pulse .75s infinite alternate;
}
@keyframes pulse {
    0% { color: rgba(186, 190, 194, .2); }
}
.countdown.building > span {
    position: relative;
    top: 0;
    animation: bounce 1.5s ease-out infinite;
}
.countdown.building > span:nth-child(2) {
    animation-delay: .1s;
}
.countdown.building > span:nth-child(3) {
    animation-delay: .2s;
}
@keyframes bounce {
    20% { top: -.5em; }
    30% { top: 0; }
}
@media (max-width: 860px) {
    .countdown {
        font-size: 65%;
    }
}

#body {
    flex: 1 0 auto;
    position: relative;
    padding: 2em 0;

    background:
        linear-gradient(#263e5c, #22344b 6px, #1e2c3e 20px, #1d2a3c 30px, #1b2939 45px, #1b2838 60px) no-repeat,
        linear-gradient(0, #263e5c, #22344b 6px, #1e2c3e 20px, #1d2a3c 30px, #1b2939 45px, #1b2838 60px) bottom
        no-repeat;
    background-size: 100% 60px;

    #page.home >& {
        background: linear-gradient(#263e5c, #22344b 6px, #1e2c3e 20px, #1d2a3c 30px, #1b2939 45px,
            #1b2838 60px, #25293c 50vh);
    }

    >.content {
        margin: 0 auto;
        padding: 0 1em;
        box-sizing: border-box;
        max-width: 864px;
        /* Force margins to be enclosed. */
        overflow: hidden;

        >p:first-of-type {
            font-size: 115%;
            text-align: center;
        }

        &:nth-child(2 of .content) {
            // Avoid occluding more-button box shadow.
            overflow: visible;
        }
    }
}

p.note, p.tip {
    display: table;
    max-width: 45em;

    opacity: .9;
    font-size: 85%;
}
p + p.note, p + p.tip {
    margin-top: -1.3em;
}
p.note:before, p.tip:before {
    content: 'Note';
    display: table-cell;
    padding-right: .5em;

    font-size: 85%;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #c4c4c4;
}
p.tip:before {
    content: 'Tip';
}

p.notice {
    padding: 1em;
    font-size: 80%;
    line-height: 1.2;
    text-align: center;

    color: #70c3ff;
    background: #131e2c;
    border: 1px dotted #5c7495;
    border-radius: 4px;
}
p.notice::before {
    content: 'NOTICE';
    font-size: 80%;

    color: #c5e4fb;
}

p.cat {
    text-align: center;
}

.filtered() {
    color: #c9b734;
}
span.filtered {
    .filtered();
}

div.warning {
    margin: 1em auto;
    padding: 1em;
    width: 86%;
    // Clearfix.
    overflow: hidden;

    font-size: 95%;
    line-height: 1.2;
    color: #e8e8e8;
    background: #0008;
    border: 1px dotted #754000;
    border-top-color: #a86009;
    border-radius: 6px;

    &:before {
        content: '!';
        float: left;
        margin: 0 .7rem .5rem 0;
        width: 60px;
        height: 54px;

        font: 270%/65px Lobster;
        clip-path: polygon(50% 0, 100% 100%, 0 100%);
        color: #ffe9ce;
        text-shadow: 2px 2px 0 #d57500;
        background: #e0990b;

        /* Manually center text */
        box-sizing: border-box;
        padding-left: 23px;
    }

    >p:first-child {
        margin-top: 0;
    }

    >p:last-child {
        margin-bottom: 0;
    }
}

.applist {
    .date {
        >a {
            color: inherit;
        }
    }

    >footer {
        grid-column: 1 / -1;
        margin: 1.5rem;

        text-transform: lowercase;
        text-align: center;
        font-size: 75%;
        opacity: .06;
    }

    #page.preview & > :is(header, div) > :is(div:nth-child(n+5), span) {
        --stat-margin: 0;
    }

    // Do not contract devlisher name.
    #page.devlisher & > div > div:nth-of-type(3) > div > a:first-of-type {
        flex-shrink: 0;
    }

    .games {
        margin: 0 .5ch;
        width: 1.8em;
        line-height: 1.8em !important;
        flex-shrink: 0;

        color: #d1d1cb;
        border: 1px solid #91c1ed;
        font-size: 80% !important;
        text-align: center;
        border-radius: 2em;

        &:hover {
            color: #1c272d !important;
            background-color: #91c1ed;
            border-color: #91c1ed;
            text-decoration: none;
        }
    }
}

.compact.ranking li > a {
    display: flex;
    height: 100%;
    align-items: center;
}
.compact.ranking li .title > :nth-child(2) {
    padding: .4em .5em;
}

.highlight {
    animation: forwards;
    animation-name: highlight, highlight-bg;
    animation-delay: 0s, .50s;
    animation-duration: 2s, 1.5s;
}
@keyframes highlight {
    25% {
        margin-top: 10px;
        margin-bottom: 10px;
        box-shadow: none;
    }
    70% {
        box-shadow: 0 0 8px 4px #49a0cc;
    }
    to {
        margin-top: 10px;
        margin-bottom: 10px;
        box-shadow: 0 0 3px 2px #49a0cc;
    }
}
@keyframes highlight-bg {
    70% {
        background: #27556c;
    }
    to {
        background: #162b38;
    }
}

.movement {
    content: '';
    display: inline-block;
    width: 22px;
    height: 21px;
    line-height: 21px;
    margin-right: 1px;
    vertical-align: middle;
    position: relative;

    text-align: center;
    font-weight: bold;
    filter: drop-shadow(0 1px 1px #0006);
}
.movement.none {
    color: #a99370;
    font-weight: bold;
}
.movement.pos, .movement.neg {
    font-size: 79%;
    color: #e7f7c8;
}
.movement.neg {
    color: #f7d3cb;
}

.movement:before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.movement.new:before {
    width: 90%;
    height: 90%;
    top: 5.5%;
    left: 3.5%;
    background: linear-gradient(#e3d778, #bfb34a);
    #icons.star();
}
.movement.none:before {
    background: #36383b;
    clip-path: inset(14% 14.5%);
}
tr.a .movement.none:before {
    background: #363638;
}
.movement.pos:before {
    top: -2px;
    background: linear-gradient(#698a48, #546f38);
    clip-path: polygon(20% 100%, 20% 50%, 0% 50%, 50% 0%, 100% 50%, 80% 50%, 80% 100%);
}
.movement.neg:before {
    top: 2px;
    background: linear-gradient(#824e46, #6d4039);
    clip-path: polygon(20% 0%, 20% 50%, 0% 50%, 50% 100%, 100% 50%, 80% 50%, 80% 0%);
}
.movement.ded {
    background: url(/svg/deny.svg);
    opacity: .6;
}
.r\&f .movement {
    width: 19px;
    height: 19px;
    line-height: 19px;
}
@media (max-width: 649px) {
    .movement {
        width: 14px;
        height: 14px;
        line-height: 14px;
    }
    .movement.pos:before {
        top: -2px;
    }
    .movement.neg:before {
        top: 1px;
    }
}

.button, .button:visited {
    margin: 1em .5em;
    min-width: 6em;
    padding: .4em .7em;

    font-size: 90%;
    color: #b7d0e8;
    background: #2f4e6c;
    border-top: 1px solid #37576e;
    border-left: 1px solid #37576e;
    border-bottom: 2px solid #233852;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .125);
    text-align: center;
    text-shadow: 0 1px 2px #467899;
    outline: none;

    &[disabled] {
        filter: saturate(20%);
        cursor: not-allowed;
    }
}
.button:not([disabled]) {
    &:hover {
        color: #d9f5ff;
        background: #3c6f96;
        border-top-color: #48718c;
        border-left-color: transparent;
        border-bottom-color: #2b4969;
        text-shadow: 0 1px 2px #5b94b3;
        text-decoration: none;
    }

    &:active {
        top: 1px;
        color: #abc2d9;
        background: #2f4e6c;
        border-top-color: #1f354d;
        border-left-color: #1f354d;
        border-bottom-width: 1px;
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, .5);
        text-shadow: none;
    }
}

.button.cur, .button:has(>:checked) {
    color: #b5e6d8;
    background: #316b59;
    border-top: 1px solid #38705e;
    border-left: 1px solid #38705e;
    border-bottom: 2px solid #235244;
    text-shadow: 0 1px 2px #469982;

    &:hover {
        color: #dbfff5;
        background: #38856c;
        border-top-color: #488a77;
        border-bottom-color: #296150;
        text-shadow: 0 1px 2px #5bb39a;
    }

    &:active {
        color: #b5e6d8;
        background: #316b59;
        border-top-color: #1f4d3e;
        border-left-color: #1f4d3e;
    }
}

.timeline {
    line-height: 1;
    margin: 1.5em auto;

    font-size: 90%;

    --width: 5em;
    --primary: #4b6a90;
    --primary-hi: #5483b3;
    --highlight: #70c3ff;
    --current: #3e9473;
    --current-hi: #67dbb6;
    --spot: #f0f8ff;
    --transition: .1s;
}
@media (max-width: 700px) {
    .timeline {
        --width: 4em;
    }
}
.timeline > ol {
    display: flex;
    flex-flow: wrap;
    justify-content: center;
}
.timeline > ol > li {
    display: flex;
    align-items: center;
    width: var(--width);
    height: 78px;

    transform: rotate(-90deg);
}
/* Track */
.timeline > ol > li:before,
.timeline > ol > li:after {
    content: '';
    position: absolute;
    background: var(--primary);
    height: calc(var(--width) - 3px);
    width: .25em;

    transition: background var(--transition);
}
.timeline > ol > li:before {
    left: .2em;
    transform: skew(0, -45deg);
}
.timeline > ol > li:after {
    transform: skew(0, 45deg);
}
.timeline > ol > li:hover:before,
.timeline > ol > li:hover:after {
    background: var(--primary-hi);
}
.timeline > ol > li.cur:before,
.timeline > ol > li.cur:after {
    background: var(--current);
}
/* Text and pole */
.timeline > ol > li > a {
    display: flex;
    flex-wrap: wrap;
    flex-grow: 1;
    align-content: center;
    height: var(--width);
    padding-left: 2em;
    position: relative;
    z-index: 1;

    color: inherit;
    background: linear-gradient(transparent 47%, var(--primary) 47%, var(--primary) 53%, transparent 53%)
        no-repeat 1px 51%;
    background-size: 1.6em 2.9em;

    transition: color var(--transition);
}
.timeline > ol > li > a:hover {
    text-decoration: none;
    color: var(--highlight);
    background-image: linear-gradient(transparent 47%, var(--primary-hi) 47%, var(--primary-hi) 53%, transparent 53%);
}
.timeline > ol > li.cur > a,
.timeline > ol > li.cur > a:hover {
    color: var(--current-hi);
    background-image: linear-gradient(transparent 47%, var(--current) 47%, var(--current) 53%, transparent 53%);
}
/* Spot */
.timeline > ol > li > a:before {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    display: block;
    left: 1px;
    top: 50%;
    transform: translate(0, -50%);
    border-radius: 50%;

    background: #1b2838;
}
.timeline > ol > li > a:hover:before {
    background: var(--spot);
    box-shadow: 0 0 0 3px var(--primary-hi);
}
.timeline > ol > li.cur > a:before,
.timeline > ol > li.cur > a:hover:before {
    background: var(--spot);
    box-shadow: 0 0 0 3px var(--current), 0 0 3px 3px #0003;
}

.players + .rating,
.owners + .rating {
    display: inline-block;
}
.velocity > span {
    font-weight: normal;
    font-size: 90%;
}

.r\&f {
    display: flex;
    flex-flow: column;
    line-height: 1.2;
}
/* Defaults for 2-column layout */
.r\&f > * {
    margin-bottom: 23px;
    min-width: 300px;
    max-width: 424px;
    width: 100%;
}
.r\&f > div:first-of-type {
    margin-top: 0;
}
/* R&f single-column layout. */
@media (max-width: 669px) {
    .r\&f > * {
        max-width: none;
    }
    .r\&f h2 {
        text-align: left;
    }
}

.col3 > .c250 {
    padding: 0 1.5em;
    box-sizing: border-box;

    font-size: 85%;
    line-height: 1.35;
    background: #141d29;
    border-radius: 8px;
    border: 2px solid #334360;

    >.title {
        line-height: 1;
    }
}

#page.ranking {
    .col2, .col3 {
        >div {
            background: linear-gradient(#121a25 34px, #495770);

            >h2 {
                margin-bottom: -2px;
                padding: .7em;

                text-align: center;
            }
        }
    }
}

/* Compact ranking. */
.compact.ranking > ol {
    display: grid;
    gap: 2px;
    position: relative;
    width: 100%;
    box-sizing: border-box;

    font-size: 90%;
    line-height: .9;
    padding: 4px;
    border-radius: 4px;
    background: radial-gradient(30% 70% at 30% 25%, #30365c, #606ea8) 0 0/200% 200%;
    filter: drop-shadow(4px 4px 0 #1b1f26);
}
.flat.compact.ranking > ol {
    background: none;
    filter: none;
    animation: none;
}
.compact.ranking > ol:before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    bottom: 2px;
    right: 2px;

    border-radius: 4px;
    background: #121d29;
}
.compact.ranking li {
    display: flex;
    align-items: center;

    --step: 0;
}
.compact.ranking li .title > :first-child {
    flex-shrink: 0;
    display: flex;
    align-items: center;

    background: #181720 no-repeat center/contain;
}
.compact.ranking li img {
    height: 36px;
    min-width: 96px;
}
.flat.compact.ranking img {
    height: 34px;
    min-width: 90px;
}
.compact.ranking li .title {
    display: flex;
    flex-grow: 1;

    background: #2d3a52;
    text-shadow: 1px 1px 1px #1e1242;

    transition: background-color 1s;
}
.flat.compact.ranking li:nth-child(2n+1) > .title {
    background: #293345;
}
.flat.compact.ranking li:nth-child(2n) > .title {
    background: #222a38;
}
.compact.ranking li .title > :first-child:not([data-video]) {
    cursor: not-allowed;
}
.compact.ranking li .title > :nth-child(2) {
    flex-grow: 1;

    line-height: 1;
    align-content: center;
}
.compact.ranking li .title > :nth-child(2) > .movement + span {
    vertical-align: middle;
}
.compact.ranking li > * {
    position: relative;
    z-index: 1;
}
.compact.ranking li > .title:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;

    background: linear-gradient(
        86deg,
        var(--dark) calc(var(--start) - var(--spread) - (var(--drift) * var(--step)) - (var(--growth) * var(--step))),
        var(--light) calc(var(--start) - (var(--drift) * var(--step))),
        var(--dark) calc(var(--start) + var(--spread) - (var(--drift) * var(--step)) + (var(--growth) * var(--step)))
    );
    mix-blend-mode: color-dodge;
    z-index: -1; /* Allow pointer events. */

    --light: #1a2833;
    --dark: transparent;
    --start: 58%; /* Light start position. */
    --spread: 13%; /* Light <-> dark distance. */
    --drift: -.18%; /* Light drift each step. */
    --growth: 1.8%; /* Light expansion each step. */

    animation: compact-ranking-quing 1.7s .1s backwards;
}
.flat.compact.ranking li > .title:before {
    --light: #121c24;

    animation: none;
}
@keyframes compact-ranking-quing {
    0% {
        width: calc(100% - (75% * var(--step) / 9));
    }
}
.compact.ranking li:nth-child(2) > .title {
    background: #2c374f;
    --step: 1;
}
.compact.ranking li:nth-child(3) > .title {
    background: #2c334a;
    --step: 2;
}
.compact.ranking li:nth-child(4) > .title {
    background: #2a2f45;
    --step: 3;
}
.compact.ranking li:nth-child(5) > .title {
    background: #292d40;
    --step: 4;
}
.compact.ranking li:nth-child(6) > .title {
    background: #292b3d;
    --step: 5;
}
.compact.ranking li:nth-child(7) > .title {
    background: #282938;
    --step: 6;
}
.compact.ranking li:nth-child(8) > .title {
    background: #272733;
    --step: 7;
}
.compact.ranking li:nth-child(9) > .title {
    background: #26252e;
    --step: 8;
}
.compact.ranking li:nth-child(10) > .title {
    background: #24232b;
    --step: 9;
}

.compact.ranking {
    .flat& {
        border-radius: 6px;
    }

    li a {
        color: #dfeaed;
        text-decoration: none;
        outline: none;

        .flat& {
            color: inherit;
        }
    }
}

/* Game rank. */
.compact.ranking li > .rank {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: stretch;
    width: 18px;

    color: inherit;
    background: linear-gradient(#262433, #181720, #262433);
    font-size: 80%;
}
.flat.compact.ranking li > .rank {
    width: 21px;

    background: linear-gradient(#242933, #181b21, #242933);
}
.compact.ranking li > .rank,
.compact.ranking li > a.rank:before {
    border-radius: 4px 0 0 4px;

    transition: .1s linear;
}
.compact.ranking li > a.rank:before {
    position: absolute;
    content: '';
    width: 100%;
    height: 100%;
    z-index: -1;
}
.compact.ranking li > a.rank:hover {
    color: #222;
}
.compact.ranking li > a.rank:hover:before {
    background: #7cb5e1;
}

/* Shadow element. */
.compact.ranking li > .title:hover > .title,
/* Second selector support no-JS fallback. */
.compact.ranking li > .title > .title:hover {
    opacity: 1;
    transition: .1s;
}
/* Preload film.svg */
.compact.ranking li > .title > .title > a[data-video] > img {
    mask: url(/svg/film.svg) center/200%;
}
.compact.ranking li a[data-video] > img:hover,
.compact.ranking li > .title > a[data-video]:hover ~ .title img {
    mask: url(/svg/film.svg) 0 0/cover;

    animation: film .5s linear infinite;
}
@keyframes film {
    100% {
        -webkit-mask-position-y: 300%;
    }
}
.compact.ranking li > .title > .title {
    position: absolute;
    height: 100%;
    width: 100%;

    opacity: 0;
    background: linear-gradient(90deg, #9e814c, #ddba83 60%, #9e814c);
    transition: opacity .6s ease-in;
}
.flat.compact.ranking li > .title > .title {
    background: none;
    box-shadow: inset 0 0 30px #78a4f5
}
.compact.ranking li .animate {
    animation: burst-out .4s ease-in forwards;
}
.flat.compact.ranking li .animate {
    animation: none;
}
@keyframes burst-out {
    0% {
        clip-path: circle(0);
    }
    to {
        clip-path: circle(100%);
    }
}
/* Image and movement. */
.compact.ranking li > .title > .title > :first-child,
.compact.ranking li > .title > .title > :last-child > :first-child {
    filter: sepia(96%) saturate(150%) hue-rotate(-5deg);
}
.flat.compact.ranking li > .title > .title > :first-child,
.flat.compact.ranking li > .title > .title > :last-child > :first-child {
    filter: sepia(96%) saturate(200%) hue-rotate(175deg);
}
.compact.ranking li > .title > .title > :last-child > :last-child {
    color: #26210b;
    text-shadow: 1px 1px 1px #f5c477;
}
.flat.compact.ranking li > .title > .title > :last-child > :last-child {
    color: #b5cbf3;
    text-shadow: none;
}

.boxlink p > a {
    color: #70c3ff;
    font-weight: bold;
}

#linkmenu {
    max-height: 0;
    position: absolute;
    overflow: hidden;
    z-index: 2;

    font-size: 90%;
    background: #2a435b;
    border-radius: 2px;
    box-shadow: 1px 1px 5px #141c26;
    transition: max-height .15s;
}
#linkmenu.show {
    max-height: 99px;
}
#linkmenu a {
    display: block;
    padding: calc(.2em + 3px) .6em calc(.2em + 4px);

    color: #59cbff;
    text-decoration: none;
}
#linkmenu > li {
    line-height: 1.1;

    background: linear-gradient(90deg, transparent, #315473, transparent) no-repeat bottom;
    background-size: 95% 1px;
}
#linkmenu > li:last-of-type {
    background: none;
}
#linkmenu > li:hover {
    background: linear-gradient(90deg, #417295, #498cb8, #417295) no-repeat bottom;
}
#linkmenu > li:hover a {
    color: #d6f3ff;
    text-shadow: 1px 1px 1px #498cb8;
}

#footer {
    display: grid;
    flex-shrink: 0;
    grid-template-columns: repeat(auto-fit, 22em);
    gap: 2em 4%;
    justify-content: center;
    padding: 2em 1.5em;

    line-height: 1.5;
    background: linear-gradient(#12141a, #171a21 80px);

    p:has(>a.patreon, >a.discord, >a.steam) {
        position: relative;
        padding-left: calc(20px + 1ch);
    }

    a.patreon, a.discord, a.steam {
        position: absolute;
        overflow: hidden;
        width: 20px;
        height: $width;
        text-indent: $width;
        left: 0;

        background: no-repeat center;
    }
    a.patreon {
        opacity: .9;

        background-image: url(//s.steam250.com/img/patreon.svg);
        background-size: 19px;
    }
    a.discord {
        background-image: url(/svg/discord.svg);
        background-size: 22px;
        background-position-y: -1px;
    }
    a.steam {
        background-image: url(/svg/steam.svg);
        background-size: 17px;
        background-position-y: 1px;
    }

    .micro.tier {
        margin-right: .3ch;
        opacity: .95;
    }
}
@media (max-width: 742px) {
    #footer {
        grid-template-columns: repeat(auto-fit, minmax(22em, 1fr));
        line-height: inherit;
    }
}
#footer > :last-child > p:first-of-type > a:not([class]) {
    display: inline-block;
    padding-top: 1.2em;
    width: 5.7em;
    height: 0;
    overflow: hidden;
    text-indent: -99%;
    vertical-align: sub;

    background: url("/svg/discord text.svg") no-repeat -1px;
    background-size: auto 1.4em;
    opacity: .75;
    transition: opacity .2s;
}
#footer > :last-child > p:first-of-type > a:hover {
    opacity: 1;
}
#footer h2 {
    margin-bottom: .7em;

    font-size: 120%;
}
#footer h3 {
    margin: 1em 0 .5em;

    font-size: 80%;
    font-weight: bold;
    text-transform: uppercase;
}
#footer p {
    margin: 1em 0;
}
#footer p:last-of-type {
    margin-bottom: 0;
}
#footer p, #footer li, #footer table {
    text-align: left;
    font-size: 80%;
}
#footer table {
    margin-bottom: .4em;
}
#footer td {
    padding-left: .8em;
}
#footer td:first-child {
    padding: 0;
}
#footer img {
    height: 16px;

    filter: saturate(.8) brightness(.75);
}
#footer a {
    color: #9e814c;
}
#footer .status > li:first-of-type > span {
    display: inline-block;
    margin: 0 .25em .2em 0;
}

.fixedlinks {
    position: fixed;
    // Ensure links are not obscured by minor visual elements exploiting stacking contexts.
    z-index: 1;
    bottom: .7vh;
    right: .7vw;
}
.fixedlinks > :first-child {
    margin-right: .2em;
}
.fixedlinks > a {
    text-transform: uppercase;
    font-size: 85%;
    color: inherit;
    opacity: .2;
    transition: opacity .1s;
}
.fixedlinks > a:hover {
    opacity: .6;
    text-decoration: none;
}
a[href='#header']:before {
    content: '▲ ';
}
a[href='#footer']:before {
    content: '▼ ';
}

ins {
    margin-top: 1rem;
}
