/* ================= GLOSSARY ================= */
.glossary-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.search-field {
    flex: 1;
    min-width: 240px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1.5px solid var(--text);
    padding: 8px 2px;
    color: var(--text-muted);
}

.search-field input {
    flex: 1;
    border: none;
    background: none;
    color: var(--text);
    font-size: .98rem;
    font-family: 'Public Sans', sans-serif;
}

.search-field input:focus {
    outline: none;
}

.chip-row {
    display: flex;
    gap: 0;
}

.chip {
    padding: 8px 14px;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--text-muted);
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.chip.active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

.glossary-list {
    max-width: 820px;
}

.term-card {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 16px;
    align-items: baseline;
}

.term-card dt {
    font-family: 'Big Shoulders Display', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    grid-column: 1;
}

.term-card .term-tag {
    grid-column: 2;
}

.term-card dd {
    margin: 0;
    color: var(--text-muted);
    font-size: .92rem;
    grid-column: 1 / -1;
}

/* derived entries point back at the key point that defines the term */
.term-card .term-src {
    grid-column: 1 / -1;
    margin: 2px 0 0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
}

.term-card .term-src .link {
    font-family: inherit;
    font-size: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.term-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: .64rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 2px;
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    white-space: nowrap;
}

.no-results {
    display: none;
    padding: 40px 0;
    color: var(--text-muted);
    font-family: 'Public Sans', sans-serif;
    font-style: italic;
}

@media (max-width: 720px) {

    /* filter chips scroll sideways instead of pushing the page wider */
    .chip-row {
        overflow-x: auto;
        scrollbar-width: none;
        max-width: 100%;
    }

    .chip-row::-webkit-scrollbar {
        display: none;
    }

    .chip {
        flex: none;
        white-space: nowrap;
    }
}

