/* Ranking page: an open editorial layout, isolated from homepage/list styles. */
.mobile-rank-home, .mobile-rank-detail {
    display: none
}

.rank-page {
    padding: 24px 0 56px;
    min-height: 650px;
    background: #fff;
    color: #30343b
}

.rank-breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    color: #969ba3;
    font-size: 12px
}

.rank-breadcrumb h1 {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    color: #626873
}

.rank-layout {
    display: grid;
    grid-template-columns:170px minmax(0, 1fr);
    column-gap: 34px
}

.rank-sidebar {
    border-right: 1px solid #eee;
    padding: 4px 25px 35px 0;
    min-width: 0
}

.rank-sidebar h2 {
    font-size: 16px;
    line-height: 24px;
    margin: 0 0 10px;
    font-weight: 600;
    color: #25272b
}

.rank-sidebar > a {
    display: block;
    position: relative;
    font-size: 15px;
    line-height: 24px;
    padding: 10px 0;
    color: #5f636c
}

.rank-sidebar > a:hover, .rank-sidebar > a.is-active {
    color: #ff6545
}

.rank-sidebar > a.is-active:before {
    content: "";
    position: absolute;
    left: -12px;
    top: 17px;
    width: 3px;
    height: 12px;
    background: #ff6545;
    border-radius: 2px
}

.rank-sidebar .rank-sidebar-secondary {
    margin-top: 38px
}

.rank-content {
    min-width: 0
}

.rank-category-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    padding: 19px 22px;
    background: #f7f7f7;
    border-radius: 5px;
    font-size: 13px;
    line-height: 22px;
    margin-bottom: 30px
}

.rank-category-bar > span {
    color: #a0a3aa
}

.rank-category-bar > a {
    color: #737780;
    white-space: nowrap
}

.rank-category-bar > a:hover, .rank-category-bar > a.is-selected {
    color: #ff6545
}

.rank-boards {
    display: grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    column-gap: 54px;
    row-gap: 30px
}

.rank-board {
    min-width: 0;
    scroll-margin-top: 20px
}

.rank-board-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee
}

.rank-board-heading h2 {
    font-size: 20px;
    line-height: 26px;
    font-weight: 400;
    margin: 0;
    color: #25272b
}

.rank-board-heading > a {
    color: #a0a3aa;
    font-size: 12px
}

.rank-board-heading > a span {
    font-size: 20px;
    vertical-align: -1px;
    margin-left: 3px;
    color: #c4c7cc
}

.rank-entries {
    padding: 0;
    margin: 0;
    list-style: none
}

.rank-entry {
    display: grid;
    grid-template-columns:18px minmax(0, 1fr) minmax(36px, 72px);
    gap: 8px;
    align-items: center;
    min-height: 48px
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    font-family: Arial, sans-serif;
    font-size: 12px;
    line-height: 17px;
    color: #fff;
    background: #c9cbce;
    font-weight: 600
}

.rank-entry:nth-child(1) .rank-number {
    background: #ff6545
}

.rank-entry:nth-child(2) .rank-number {
    background: #ff8b30
}

.rank-entry:nth-child(3) .rank-number {
    background: #ffc400
}

.rank-book-title {
    display: block;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    line-height: 22px
}

.rank-book-title:hover, .rank-board-heading > a:hover {
    color: #ff6545
}

.rank-entry-author {
    display: block;
    min-width: 0;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    color: #a0a3aa
}

.rank-entry-lead {
    grid-template-columns:18px minmax(0, 1fr) 60px;
    align-items: start;
    min-height: 94px;
    margin-bottom: 6px
}

.rank-entry-lead .rank-number {
    margin-top: 3px
}

.rank-lead-info {
    min-width: 0
}

.rank-lead-author {
    margin: 10px 0 4px;
    font-size: 12px;
    line-height: 18px;
    color: #a0a3aa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.rank-metric {
    margin: 0;
    font-size: 12px;
    line-height: 20px;
    color: #ff6545
}

.rank-cover {
    display: block;
    position: relative;
    width: 60px;
    height: 80px;
    overflow: hidden;
    border-radius: 2px;
    background: #ede8de
}

.rank-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover
}

.rank-cover img[hidden] {
    display: none
}

.rank-cover-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 8px;
    background: linear-gradient(145deg, #f5f0e5, #d8c9aa);
    font-size: 11px;
    line-height: 16px;
    color: #8b7853;
    text-align: center;
    overflow: hidden
}

.rank-empty {
    padding: 28px 0;
    color: #a0a3aa;
    font-size: 13px
}

.rank-boards-expanded {
    grid-template-columns:minmax(0, 1fr)
}

.rank-boards-expanded .rank-entries {
    display: grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    column-gap: 45px
}

.rank-boards-expanded .rank-entry-lead {
    grid-column: 1/-1;
    max-width: 420px;
    margin-bottom: 14px;
    width: 100%
}

.rank-boards-expanded .rank-entry {
    grid-template-columns:18px minmax(0, 1fr) 100px
}

.rank-boards-expanded .rank-entry-lead {
    grid-template-columns:18px minmax(0, 1fr) 60px
}

.rank-page a:focus-visible {
    outline: 2px solid #ffad8e;
    outline-offset: 3px
}

@media (min-width: 768px) and (max-width: 1100px) {
    .rank-layout {
        grid-template-columns:125px minmax(0, 1fr);
        column-gap: 24px
    }

    .rank-boards {
        column-gap: 24px
    }

    .rank-entry {
        grid-template-columns:17px minmax(0, 1fr);
        gap: 6px
    }

    .rank-entry-author {
        display: none
    }

    .rank-entry-lead {
        grid-template-columns:17px minmax(0, 1fr) 48px
    }

    .rank-cover {
        width: 48px;
        height: 64px
    }

    .rank-lead-author {
        margin-top: 5px
    }

    .rank-board-heading h2 {
        font-size: 18px
    }
}

@media (max-width: 767px) {
    .rank-page {
        display: none
    }

    .mobile-rank-home {
        display: block;
        padding: 28px 20px 60px;
        /*min-height: calc(100vh - 101px);*/
        background: #fff
    }

    .mobile-rank-home > h1 {
        margin: 0 0 18px;
        font-size: 14px;
        font-weight: 400;
        line-height: 20px;
        color: #333b46
    }

    .mobile-rank-links {
        display: grid;
        grid-template-columns:repeat(2, minmax(0, 1fr));
        gap: 18px 20px
    }

    .mobile-rank-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        min-height: 74px;
        padding: 14px 18px;
        border-radius: 8px;
        background: #f2f7ff
    }

    .mobile-rank-link h2 {
        margin: 0 0 4px;
        font-size: 18px;
        font-weight: 600;
        line-height: 25px;
        white-space: nowrap
    }

    .mobile-rank-link div > span {
        display: block;
        color: #949ba8;
        font-size: 11px;
        line-height: 16px
    }

    .mobile-rank-link-finished {
        background: #fff4f3
    }

    .mobile-rank-icon {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: none;
        width: 28px;
        height: 30px;
        border-radius: 3px;
        background: linear-gradient(#62c6ff, #39abf3);
        box-shadow: 0 5px 8px #c7e7fa
    }

    .mobile-rank-icon:after {
        content: "";
        position: absolute;
        left: 7px;
        right: 7px;
        bottom: 4px;
        height: 3px;
        border-radius: 2px;
        background: #ffe46b
    }

    .mobile-rank-icon svg {
        width: 17px;
        height: 18px;
        fill: #fff;
        margin-bottom: 5px
    }

    .mobile-rank-link-finished .mobile-rank-icon {
        background: linear-gradient(#ff9b74, #ff7250);
        box-shadow: 0 5px 8px #ffe1cf
    }

    .ranking-detail-page .site-header {
        display: none
    }

    .mobile-rank-detail {
        display: block;
        background: #fff;
        min-height: 100vh
    }

    .mobile-rank-top {
        display: flex;
        align-items: center;
        gap: 20px;
        height: 50px;
        padding: 0 16px;
        border-bottom: 1px solid #eceef1
    }

    .mobile-rank-top h1 {
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0;
        font-weight: 400;
        font-size: 18px;
        line-height: 24px
    }

    .mobile-rank-top a, .mobile-rank-top button {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: none;
        width: 22px;
        height: 28px;
        border: 0;
        background: none;
        color: #30343b;
        padding: 0
    }

    .mobile-rank-top .mobile-rank-back {
        width: 12px
    }

    .mobile-rank-top svg {
        width: 23px;
        height: 23px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.5;
        stroke-linecap: round;
        stroke-linejoin: round
    }

    .rank-mobile-search[hidden] {
        display: none
    }

    .rank-mobile-search:not([hidden]) {
        display: flex;
        gap: 8px;
        padding: 10px 16px;
        border-bottom: 1px solid #eee
    }

    .rank-mobile-search input {
        flex: 1;
        min-width: 0;
        width: 0;
        border: 1px solid #ddd;
        padding: 8px;
        font-size: 13px;
        border-radius: 3px
    }

    .rank-mobile-search button {
        background: var(--yellow);
        padding: 0 14px;
        border: 0;
        font-size: 13px
    }

    .mobile-rank-filters {
        padding: 12px 20px 14px;
        border-bottom: 8px solid #f5f6f8
    }

    .mobile-rank-filters nav {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px 16px;
        font-size: 13px;
        line-height: 21px
    }

    .mobile-rank-filters nav + nav {
        margin-top: 14px
    }

    .mobile-rank-filters a {
        white-space: nowrap
    }

    .mobile-rank-filters .is-selected {
        color: #e97124
    }

    .mobile-rank-books {
        list-style: none;
        padding: 10px 20px 0;
        margin: 0
    }

    .mobile-rank-books > li {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 10px 0;
        min-height: 86px
    }

    .mobile-rank-cover {
        position: relative;
        flex: none;
        width: 50px;
        height: 67px;
        overflow: hidden;
        background: #e6dcc5;
        border-radius: 2px
    }

    .mobile-rank-cover > span {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 15px;
        font-size: 10px;
        padding: 6px;
        height: 100%;
        color: #8a7753;
        background: linear-gradient(145deg, #f5efdf, #d9c8a8)
    }

    .mobile-rank-cover img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover
    }

    .mobile-rank-cover img[hidden] {
        display: none
    }

    .mobile-rank-info {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        min-height: 67px;
        padding: 1px 0 2px
    }

    .mobile-rank-info h2 {
        font-size: 15px;
        font-weight: 400;
        line-height: 21px;
        margin: 0
    }

    .mobile-rank-info h2 a {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden
    }

    .mobile-rank-info p {
        margin: auto 0 0;
        color: #999fa9;
        font-size: 12px;
        line-height: 19px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .mobile-rank-score {
        flex: none;
        width: 51px;
        text-align: right;
        padding-top: 2px
    }

    .mobile-rank-score b {
        display: block;
        color: #969daa;
        font-size: 16px;
        line-height: 21px;
        font-weight: 500
    }

    .mobile-rank-score b.top-three {
        color: #ff615d
    }

    .mobile-rank-score span {
        display: block;
        font-size: 11px;
        line-height: 16px;
        color: #b99c64;
        margin-top: 4px
    }

    .mobile-rank-score small {
        display: block;
        color: #b99c64;
        font-size: 12px;
        line-height: 17px;
        margin-top: 18px
    }

    .mobile-rank-score span + small {
        margin-top: 0
    }

    .mobile-rank-empty {
        padding: 40px 20px;
        color: #999fa9;
        text-align: center;
        font-size: 13px
    }

    .mobile-rank-pager {
        padding: 20px 15px 30px
    }

    .mobile-rank-detail a:focus-visible, .mobile-rank-link:focus-visible {
        outline: 2px solid var(--yellow);
        outline-offset: 3px
    }

    .rank-page {
        padding: 17px 15px 35px;
        min-height: 0
    }

    .rank-breadcrumb {
        margin-bottom: 18px
    }

    .rank-layout {
        display: block
    }

    .rank-sidebar {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        align-items: center;
        border-right: 0;
        border-bottom: 1px solid #eee;
        padding: 0 0 12px;
        margin-bottom: 18px
    }

    .rank-sidebar h2, .rank-sidebar > a[href="/latest"], .rank-sidebar > a[href="/categories"] {
        display: none
    }

    .rank-sidebar > a {
        flex: none;
        padding: 6px 12px;
        font-size: 13px;
        line-height: 22px;
        border-radius: 3px;
        background: #f7f7f7
    }

    .rank-sidebar > a.is-active {
        background: #fff0e9;
        color: #ff6545
    }

    .rank-sidebar > a.is-active:before {
        display: none
    }

    .rank-category-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 18px;
        padding: 12px;
        margin-bottom: 22px;
        font-size: 12px
    }

    .rank-category-bar > span {
        white-space: nowrap
    }

    .rank-boards {
        grid-template-columns:minmax(0, 1fr);
        gap: 30px
    }

    .rank-board-heading {
        margin-bottom: 18px
    }

    .rank-board-heading h2 {
        font-size: 19px
    }

    .rank-entry {
        min-height: 45px;
        grid-template-columns:18px minmax(0, 1fr) 90px
    }

    .rank-entry-lead {
        min-height: 94px;
        grid-template-columns:18px minmax(0, 1fr) 60px
    }

    .rank-boards-expanded .rank-entries {
        display: block
    }

    .rank-boards-expanded .rank-entry-lead {
        max-width: none
    }
}
