.corpus-rank {
    max-width: 56rem;
}

.corpus-rank-header,
.corpus-word-detail,
.corpus-empty {
    padding: clamp(1rem, 4vw, 2rem);
    background: #f0f6f3;
    border: 1px solid #d5e2da;
    border-radius: .75rem;
    color: #183b2b;
}

.corpus-rank-header h1 {
    font-size: clamp(1.7rem, 5vw, 2.5rem);
    font-weight: 700;
}

.corpus-scope-menu {
    position: relative;
}

.corpus-scope-options {
    position: absolute;
    z-index: 5;
    width: max-content;
    max-width: min(22rem, calc(100vw - 2rem));
    border: 1px solid #d5e2da;
    border-radius: .5rem;
    background: white;
    box-shadow: 0 .25rem .75rem rgb(0 0 0 / 12%);
}

.corpus-scope-search {
    min-width: min(16rem, calc(100vw - 2rem));
}

.corpus-scope-search:not([hidden]) {
    display: block;
}

.corpus-scope-options ul {
    max-height: 16rem;
    overflow-y: auto;
    overflow-wrap: anywhere;
}

.corpus-scope-menu a {
    display: block;
    padding: .5rem .75rem;
}

.corpus-scope-menu a[aria-current] {
    font-weight: 700;
    background: #e5f0e9;
}

.corpus-rank-table td,
.corpus-rank-table th {
    padding: .65rem .75rem;
    font-variant-numeric: tabular-nums;
}

.corpus-rank-table tr:not(.corpus-detail-row) td:first-child {
    width: 4.5rem;
    color: #535c59;
}

.corpus-rank-table a,
.corpus-word-detail dt {
    overflow-wrap: anywhere;
}

.corpus-word-detail dl div {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    padding-top: .4rem;
    border-top: 1px solid #d5e2da;
}

.corpus-word-detail dd {
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .corpus-scope-menu {
        position: static;
    }

    .corpus-scope {
        position: relative;
    }

    .corpus-scope-options {
        left: 0;
        right: 0;
    }
}
