body.dictionary-overview-view {
    min-width: 1180px;
}

.dictionary-overview-view .dictionary-shell {
    width: min(1660px, calc(100% - 48px));
}

.dictionary-overview-view .dictionary-header {
    align-items: center;
}

.dictionary-overview-view .dictionary-total {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 320px;
}

.dictionary-overview-view .dictionary-total small {
    flex-basis: 100%;
    color: var(--dictionary-muted);
    font-size: 12px;
    text-align: right;
}

.dictionary-overview-toolbar {
    grid-template-columns: minmax(300px, 1fr) 220px 220px 64px;
}

.dictionary-overview-results {
    position: relative;
    min-height: 420px;
    margin-top: 18px;
}

.dictionary-overview-head,
.dictionary-overview-row {
    display: grid;
    grid-template-columns:
        minmax(190px, 0.9fr)
        minmax(460px, 2.4fr)
        repeat(3, minmax(64px, 0.38fr));
    align-items: center;
    gap: 14px;
}

.dictionary-overview-head {
    min-height: 39px;
    padding: 0 18px;
    color: var(--dictionary-muted);
    font-size: 10px;
    font-weight: 750;
}

.dictionary-overview-head span:nth-child(n + 3) {
    text-align: center;
}

.dictionary-overview-list {
    display: grid;
    gap: 6px;
}

.dictionary-overview-row {
    position: relative;
    isolation: isolate;
    min-height: 92px;
    padding: 15px 18px 17px;
}

.dictionary-overview-row::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: var(--dictionary-surface);
    clip-path: polygon(0.4% 7%, 7% 1%, 20% 4%, 35% 0, 51% 3%, 66% 1%, 82% 4%, 99.6% 0, 100% 87%, 92% 97%, 76% 94%, 59% 100%, 40% 95%, 22% 99%, 0 91%);
}

.dictionary-overview-row:nth-child(even)::before {
    background: color-mix(in srgb, var(--dictionary-header) 9%, var(--dictionary-surface));
    clip-path: polygon(0 2%, 13% 5%, 29% 1%, 47% 4%, 64% 0, 81% 4%, 100% 2%, 99.5% 92%, 88% 97%, 68% 94%, 48% 100%, 27% 95%, 9% 99%, 0.4% 88%);
}

.dictionary-overview-row:hover::before {
    background: var(--dictionary-hover);
}

.overview-topic-link {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 16px;
    gap: 5px 8px;
    min-width: 0;
    color: var(--dictionary-text);
    text-decoration: none;
}

.overview-topic-link strong {
    overflow: hidden;
    font-size: 17px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-topic-link span {
    grid-column: 1;
    color: var(--dictionary-muted);
    font-size: 11px;
}

.overview-topic-link i {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    color: var(--dictionary-muted);
    font-size: 11px;
}

.overview-topic-link:hover,
.overview-topic-link:focus-visible {
    color: var(--dictionary-text);
    outline: none;
}

.overview-topic-link:hover i,
.overview-topic-link:focus-visible i {
    color: var(--dictionary-red);
}

.overview-topic-link::after {
    content: "";
    position: absolute;
    right: 20px;
    bottom: -5px;
    width: 0;
    height: 3px;
    background: color-mix(in srgb, var(--dictionary-red) 62%, transparent);
    transform: rotate(-3deg);
    transition: width 0.16s ease;
}

.overview-topic-link:hover::after,
.overview-topic-link:focus-visible::after {
    width: 28px;
}

.overview-database-list {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex-wrap: wrap;
}

.overview-database-sticker {
    --overview-database-color: #767676;
    --overview-database-text: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 28px;
    box-sizing: border-box;
    padding: 6px 11px;
    color: var(--dictionary-text);
    clip-path: polygon(3% 5%, 94% 0, 100% 22%, 97% 91%, 78% 100%, 2% 94%, 0 31%);
    text-decoration: none;
    white-space: nowrap;
}

.overview-database-sticker strong {
    font-size: 11px;
    line-height: 1;
}

.overview-database-sticker span {
    font-size: 9px;
    line-height: 1;
}

.overview-database-sticker.is-defined,
.overview-database-sticker.is-linked-only {
    background: color-mix(in srgb, var(--overview-database-color) 12%, var(--dictionary-control-paper));
    color: color-mix(in srgb, var(--overview-database-color) 66%, var(--dictionary-text));
    color: oklch(from var(--overview-database-color) min(l, 0.46) min(c, 0.16) h);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--overview-database-color) 42%, var(--dictionary-border));
}

.overview-database-sticker.is-context {
    filter: saturate(0.48);
    opacity: 0.62;
}

.overview-database-sticker:hover,
.overview-database-sticker:focus-visible {
    filter: saturate(1);
    opacity: 1;
    outline: none;
}

.overview-database-sticker[data-database="CHARLS" i],
.overview-database-sticker[data-database="Harmonized CHARLS" i] {
    --overview-database-color: var(--color-charls);
}

.overview-database-sticker[data-database="CHNS" i] {
    --overview-database-color: var(--color-china);
}

.overview-database-sticker[data-database="ELSA" i],
.overview-database-sticker[data-database="Harmonized ELSA" i] {
    --overview-database-color: var(--color-uk);
}

.overview-database-sticker[data-database="NHANES" i],
.overview-database-sticker[data-database^="NHANES " i],
.overview-database-sticker[data-database^="NHES " i],
.overview-database-sticker[data-database="Hispanic HANES" i],
.overview-database-sticker[data-database="NHEFS" i],
.overview-database-sticker[data-database="NNYFS" i],
.overview-database-sticker[data-database="NHIS" i],
.overview-database-sticker[data-database^="NHIS (" i],
.overview-database-sticker[data-database="HRS" i],
.overview-database-sticker[data-database="RAND HRS" i],
.overview-database-sticker[data-database="Harmonized HRS" i],
.overview-database-sticker[data-database="Harmonized RAND HRS" i] {
    --overview-database-color: var(--color-usa);
}

.overview-database-sticker[data-database="KLoSA" i],
.overview-database-sticker[data-database="KLoSA（英文）" i],
.overview-database-sticker[data-database="KLoSA（韩文）" i],
.overview-database-sticker[data-database="KNHANES" i],
.overview-database-sticker[data-database="Harmonized KLoSA" i] {
    --overview-database-color: var(--color-south-korea);
}

.overview-database-sticker[data-database="SHARE" i],
.overview-database-sticker[data-database="Harmonized SHARE" i] {
    --overview-database-color: var(--color-europe);
}

.overview-database-sticker[data-database="MHAS" i],
.overview-database-sticker[data-database="Harmonized MHAS" i] {
    --overview-database-color: var(--color-mexico);
}

.overview-database-sticker[data-database="LASI" i],
.overview-database-sticker[data-database="Harmonized LASI" i] {
    --overview-database-color: var(--color-india);
    --overview-database-text: #2c2c2c;
}

.overview-database-sticker[data-database="CRELES" i],
.overview-database-sticker[data-database="Harmonized CRELES" i] {
    --overview-database-color: var(--color-costa-rica);
}

.overview-database-sticker[data-database="多库联合"] {
    --overview-database-color: var(--multi-database-color, #579C94);
}

.overview-metric {
    display: grid;
    justify-items: center;
    gap: 3px;
    color: var(--dictionary-muted);
}

.overview-metric strong {
    color: var(--dictionary-text);
    font-size: 17px;
    line-height: 1;
}

.overview-metric small {
    font-size: 9px;
}

.overview-metric.is-emphasis strong {
    color: var(--dictionary-red);
}

.dictionary-overview-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: var(--dictionary-surface);
    color: var(--dictionary-muted);
    clip-path: polygon(0.4% 2%, 18% 0, 37% 2%, 58% 0, 79% 2%, 99.6% 0, 100% 96%, 78% 99%, 57% 97%, 35% 100%, 16% 98%, 0 100%);
    font-size: 14px;
}

.dictionary-overview-footer {
    margin-top: 8px;
}

:root:not([data-theme="light"]) .overview-database-sticker.is-defined,
:root:not([data-theme="light"]) .overview-database-sticker.is-linked-only {
    background: color-mix(in srgb, var(--overview-database-color) 20%, var(--dictionary-control-paper));
    color: color-mix(in srgb, var(--overview-database-color) 82%, var(--dictionary-text));
    color: oklch(from var(--overview-database-color) max(l, 0.8) min(c, 0.12) h);
}

@media (max-width: 1180px) and (hover: none) and (pointer: coarse) {
    body.dictionary-overview-view {
        min-width: 0;
    }

    .dictionary-overview-view .dictionary-shell {
        width: calc(100% - 28px);
    }

    .dictionary-overview-toolbar {
        grid-template-columns: minmax(260px, 1fr) 190px 190px 64px;
    }

    .dictionary-overview-head,
    .dictionary-overview-row {
        grid-template-columns:
            minmax(160px, 0.8fr)
            minmax(370px, 2fr)
            repeat(5, minmax(54px, 0.34fr));
        gap: 9px;
    }
}

@media (max-width: 900px) and (hover: none) and (pointer: coarse) {
    .dictionary-overview-head {
        display: none;
    }

    .dictionary-overview-list {
        gap: 10px;
    }

    .dictionary-overview-row {
        grid-template-columns: repeat(5, minmax(48px, 1fr));
        gap: 13px 7px;
        padding: 16px 15px 18px;
    }

    .overview-topic-link,
    .overview-database-list {
        grid-column: 1 / -1;
    }

    .overview-database-list {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }
}

@media (max-width: 640px) and (hover: none) and (pointer: coarse) {
    .dictionary-overview-view .dictionary-shell {
        width: calc(100% - 20px);
        padding-top: 20px;
    }

    .dictionary-overview-view .dictionary-header {
        position: relative;
        display: block;
    }

    .dictionary-overview-view .dictionary-header h1 {
        padding-right: 112px;
        font-size: 26px;
        white-space: nowrap;
    }

    .dictionary-overview-view .dictionary-total {
        position: absolute;
        top: 23px;
        right: 0;
        padding-top: 0;
    }

    .dictionary-view-switch {
        gap: 4px;
    }

    .dictionary-view-switch a {
        min-width: 0;
        padding-inline: 8px;
        font-size: 11px;
    }

    .dictionary-overview-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .dictionary-overview-toolbar .dictionary-search {
        grid-column: 1 / -1;
    }

    .dictionary-overview-toolbar .dictionary-reset {
        grid-column: 2;
        width: 100%;
    }

    .overview-topic-link strong {
        font-size: 16px;
    }

    .overview-metric strong {
        font-size: 15px;
    }

    .dictionary-overview-footer {
        align-items: flex-start;
        gap: 8px;
        flex-direction: column;
    }

    .dictionary-overview-footer .dictionary-pagination {
        align-self: flex-end;
    }
}
