/**
 * General vocabulary taxonomy indexes.
 * Kept in the cvi- namespace so generic taxonomy archives and other indexes
 * retain their existing presentation.
 */

.core-vocabulary-index-layout,
.general-vocabulary-index-layout {
    max-width: 1180px;
}

.core-vocabulary-index-glossary,
.general-vocabulary-index-glossary {
    display: block;
}

.cvi-subcategories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.75rem;
    margin: 0 0 1rem;
    color: rgba(0, 0, 0, 0.62);
    font-size: 0.86rem;
}

.cvi-subcategories__label {
    font-weight: 700;
}

.cvi-subcategories__link {
    color: #52647f;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.cvi-index {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.75rem 0.5rem;
    margin: 0 0 1.5rem;
    background: var(--special-page-surface-bg, #fff);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cvi-index__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.2;
    text-decoration: none;
    color: rgba(0, 0, 0, 0.7);
    transition: all 0.18s ease;
}

.cvi-index__link:hover,
.cvi-index__link:focus {
    color: #000;
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.25);
}

.cvi-index__link--active {
    color: #fff;
    border-color: #7c8fae;
    background: #7c8fae;
}

.cvi-index__link--active:hover,
.cvi-index__link--active:focus {
    color: #fff;
    background: #687b9a;
    border-color: #687b9a;
}

.cvi-index__link--empty {
    opacity: 0.25;
    border-style: dashed;
    pointer-events: none;
}

.cvi-letter {
    margin: 0 0 1.75rem;
    scroll-margin-top: 3.5rem;
}

.cvi-letter__head {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin: 0 0 0.75rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.15);
}

.cvi-letter__char {
    font-size: 1.5rem;
    font-weight: 700;
}

.cvi-letter__count {
    font-size: 0.85rem;
    opacity: 0.6;
}

.cvi-list {
    list-style: none;
    margin: 0;
    padding: 0;
    column-count: 3;
    column-gap: 2rem;
}

.cvi-row {
    break-inside: avoid;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.35rem 0.6rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cvi-row__mn {
    font-weight: 600;
    text-decoration: none;
    color: inherit;
}

a.cvi-row__mn:hover,
a.cvi-row__mn:focus {
    text-decoration: underline;
}

.cvi-row__jp {
    font-size: 0.9rem;
    opacity: 0.85;
}

.cvi-row__en {
    width: 100%;
    font-size: 0.85rem;
    opacity: 0.6;
}

@media (max-width: 900px) {
    .cvi-list {
        column-count: 2;
    }
}

@media (max-width: 720px) {
    .cvi-list {
        column-count: 1;
    }
}
