.theme-benefit-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: .35rem 0 0;
}

.theme-benefit-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: .2rem .55rem;
    border-radius: 999px;
    border: 1px solid #d0d7e2;
    background: #eef3f9;
    color: #1a3a5c;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.3;
    cursor: help;
}

.theme-benefit-tip {
    position: fixed;
    z-index: 80;
    max-width: min(22rem, calc(100vw - 1.5rem));
    padding: .45rem .65rem;
    border-radius: 6px;
    background: #122033;
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.4;
    box-shadow: 0 8px 22px rgba(10, 24, 44, 0.28);
    pointer-events: none;
}

.theme-badge-legend-wrap {
    margin: 0 0 1.15rem;
}

.theme-badge-legend__intro--lead {
    margin: 0 0 .65rem;
}

.theme-badge-legend {
    margin: 0;
    padding: 0;
    border: 1px solid #d5dee8;
    border-radius: 8px;
    background: #f8fafc;
}

.theme-badge-legend__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .35rem .75rem;
    padding: .9rem 1rem;
    cursor: pointer;
    list-style: none;
}

.theme-badge-legend__summary::-webkit-details-marker {
    display: none;
}

.theme-badge-legend__summary::before {
    content: '';
    width: .45rem;
    height: .45rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    opacity: .65;
    flex: 0 0 auto;
    margin-right: .15rem;
}

.theme-badge-legend[open] .theme-badge-legend__summary::before {
    transform: rotate(45deg);
    margin-top: .15rem;
}

.theme-badge-legend__summary strong {
    font-size: .95rem;
}

.theme-badge-legend__summary span {
    color: #5b6b7c;
    font-size: .88rem;
}

.theme-badge-legend__body {
    padding: 0 1rem 1rem;
}

.theme-badge-legend__intro {
    margin: 0 0 .75rem;
    font-size: .92rem;
    line-height: 1.45;
    color: #1f2937;
}

.theme-badge-legend__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.theme-badge-legend__list li {
    display: grid;
    grid-template-columns: minmax(9.5rem, max-content) 1fr;
    gap: .55rem .85rem;
    align-items: start;
    font-size: .88rem;
    line-height: 1.4;
    color: #5b6b7c;
}

.theme-benefit-chip--filter {
    appearance: none;
    cursor: pointer;
    font: inherit;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
}

.theme-benefit-chip.is-feature-on,
.theme-benefit-chip.is-feature-match {
    background: #1a4d8c !important;
    border-color: #1a4d8c !important;
    color: #fff !important;
    box-shadow: 0 0 0 2px rgba(26, 77, 140, 0.22);
}

.theme-benefit-chip.is-feature-dim {
    opacity: .42;
}

.ticlite-theme-card[hidden],
.admin-select-card--catalog[hidden] {
    display: none !important;
}

.ticlite-theme-card.is-feature-hidden,
.admin-select-card--catalog.is-feature-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    pointer-events: none !important;
}

.ticlite-theme-card.is-feature-filtered,
.admin-select-card--catalog.is-feature-filtered {
    outline: 2px solid #1a4d8c;
    outline-offset: 1px;
}

.theme-feature-selected {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .65rem;
    margin: .85rem 0 0;
    padding: .65rem .75rem;
    border: 1px solid #c5d4e8;
    border-radius: 10px;
    background: #e8f0fa;
}

.theme-feature-selected[hidden] {
    display: none !important;
}

.theme-feature-selected__label {
    margin: 0;
    font-size: .8rem;
    font-weight: 700;
    color: #14365c;
    flex: 0 0 auto;
}

.theme-feature-selected__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    flex: 1 1 auto;
    min-width: 0;
}

.theme-feature-selected__chip {
    gap: .3rem;
}

.theme-feature-selected__x {
    font-size: 1rem;
    line-height: 1;
    font-weight: 700;
}

.theme-feature-selected__clear,
.theme-badge-legend__clear {
    appearance: none;
    border: 0;
    background: #1a4d8c;
    color: #fff;
    border-radius: 999px;
    padding: .3rem .75rem;
    font: inherit;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    margin-left: auto;
}

.theme-feature-selected__clear:hover,
.theme-feature-selected__clear:focus-visible,
.theme-badge-legend__clear:hover,
.theme-badge-legend__clear:focus-visible {
    background: #14365c;
}

.theme-feature-filter-empty {
    margin: .75rem 0 0;
    color: #5b6b7c;
    font-size: .95rem;
}

.theme-badge-legend__list .theme-benefit-chip {
    justify-self: start;
    align-self: start;
    margin-top: .1rem;
}

@media (max-width: 640px) {
    .theme-badge-legend__list li {
        grid-template-columns: 1fr;
        gap: .3rem;
    }
}