/**
 * Glossary page styles.
 *
 * Enqueued only on /glossary/ (is_page('glossary')) via functions.php.
 * Mirrors mockups/glossary/index.html — letter-chip nav, dl spacing,
 * reveal animation.
 *
 * Brand tokens use the live kit hexes documented in
 * memory/reference_elementor_kit_colors.md.
 */

/* ---------------- A-Z chip nav (sticky) ---------------- */

.pl-gloss-az {
    padding: 20px 0;
    background: #f5f2ea;
    border-top: 1px solid #f0ebde;
    border-bottom: 1px solid #f0ebde;
    position: sticky;
    top: 80px;
    z-index: 30;
    backdrop-filter: blur(4px);
    background: rgba(245, 242, 234, 0.9);
}

.pl-gloss-az__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.pl-gloss-chip {
    width: 36px;
    height: 36px;
    border: 1px solid #e5e5e3;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cabin', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.pl-gloss-chip:hover {
    background: #D16D32;
    color: #ffffff;
    border-color: #D16D32;
}

.pl-gloss-chip--disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pl-gloss-chip--disabled:hover {
    background: #ffffff;
    color: #1a1a1a;
    border-color: #e5e5e3;
}

/* ---------------- Featured chips row ---------------- */

.pl-gloss-featured {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px 0;
}

.pl-gloss-featured__label {
    font-family: 'Cabin', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #40A3A1;
    font-weight: 600;
    margin: 0 0 16px;
}

.pl-gloss-featured__row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pl-gloss-featured__chip {
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e5e5e3;
    font-family: 'Cabin', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.pl-gloss-featured__chip:hover {
    border-color: #40A3A1;
    color: #40A3A1;
}

/* ---------------- A-Z index ---------------- */

.pl-gloss-index {
    max-width: 768px;
    margin: 0 auto;
    padding: 32px 24px 48px;
    display: flex;
    flex-direction: column;
    gap: 56px;
}

.pl-gloss-section {
    scroll-margin-top: 140px;
}

.pl-gloss-section__heading {
    font-family: 'Cabin', sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    padding-bottom: 8px;
    background-image: linear-gradient(to right,#AD1F69 0%,#C42727 14.28%,#D16D32 28.57%,#E6B229 42.85%,#E5D129 57.14%,#B0C633 71.43%,#449A46 85.71%,#40A3A1 100%);
    background-repeat: no-repeat;
    background-position: bottom left;
    background-size: 100% 2px;
}

.pl-gloss-dl {
    margin: 24px 0 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pl-gloss-term {
    scroll-margin-top: 140px;
}

.pl-gloss-term__title {
    font-family: 'Cabin', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.pl-gloss-term__full {
    font-weight: 400;
    color: #4a4a48;
}

.pl-gloss-term__def {
    margin: 4px 0 0;
    color: #616160;
    font-family: 'Cabin', sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

.pl-gloss-term__def p:first-child { margin-top: 0; }
.pl-gloss-term__def p:last-child  { margin-bottom: 0; }

.pl-gloss-term__def code {
    background: #f5f2ea;
    padding: 1px 6px;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 0.92em;
}

.pl-gloss-term__def a {
    color: #40A3A1;
    text-decoration: underline;
}

.pl-gloss-term__def a:hover {
    color: #D16D32;
}

.pl-gloss-term__diagram {
    margin: 16px 0 0;
}

.pl-gloss-term__diagram img {
    display: block;
    max-width: 100%;
    height: auto;
}

.pl-gloss-empty {
    max-width: 768px;
    margin: 64px auto;
    padding: 0 24px;
    color: #616160;
    text-align: center;
}

/* ---------------- Reveal animation ---------------- */

.pl-gloss-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.3, 1),
                transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.pl-gloss-reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .pl-gloss-reveal,
    .pl-gloss-reveal.is-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
