/*
 * The glossary: the terms a viewer is expected to know, alphabetical.
 *
 * Consumes the court tokens in crimson-court.css and the chrome in
 * court-chrome.css and defines no colours of its own. Recorded in
 * BRANDING.md under The Crimson Court.
 */

.glossary-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 28px 16px 60px;
}

.glossary-lede {
    max-width: 62ch;
    margin: 0 0 18px;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 18px;
    line-height: 1.55;
    color: var(--court-secondary);
}

/* The letter bar: the letters that have entries link, the rest are quiet. */
.glossary-letters {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin: 0 0 6px;
    padding: 10px 0;
    border-top: 1px solid var(--court-line);
    border-bottom: 1px solid var(--court-line);
    font: 600 12px 'Cinzel', Georgia, serif;
    letter-spacing: .08em;
}

.glossary-letters a,
.glossary-letters span {
    display: inline-block;
    min-width: 28px;
    padding: 4px 0;
    text-align: center;
    text-decoration: none;
}

.glossary-letters a { color: var(--royal-gold); transition: color .18s ease, background-color .18s ease; }

.glossary-letters a:hover,
.glossary-letters a:focus-visible { color: var(--royal-black); background: var(--royal-gold); }

.glossary-letters span { color: var(--court-line); }

.glossary-count {
    margin: 0 0 26px;
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: 15px;
    color: var(--court-secondary);
}

/* A letter's run: the letter in the margin, the entries beside it. */
.glossary-group {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 0 20px;
    margin-bottom: 26px;
    scroll-margin-top: calc(var(--court-header-h, 68px) + 16px);
}

.glossary-letter {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    color: var(--royal-gold);
    opacity: .55;
    padding-top: 12px;
}

.glossary-entries { min-width: 0; }

.glossary-entry {
    padding: 16px 0 18px;
    border-bottom: 1px solid var(--court-line);
    scroll-margin-top: calc(var(--court-header-h, 68px) + 16px);
    transition: box-shadow .3s ease, padding-left .3s ease;
}

.glossary-entry.is-targeted { box-shadow: inset 3px 0 0 var(--crimson-blood); padding-left: 14px; }

.glossary-entry-head {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 4px;
    font: 600 10px 'Cinzel', Georgia, serif;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--court-secondary);
}

.glossary-kind i { margin-right: 4px; color: var(--royal-gold); }

/* An h3, painted by court-chrome's bare-heading rule; the link is the
   term's own address, so a term can be copied and sent. */
.glossary-term { margin: 0 0 6px; }

.glossary-term a {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: .02em;
    text-decoration: none;
    color: var(--parchment);
    transition: color .18s ease;
}

.glossary-term a:hover,
.glossary-term a:focus-visible { color: var(--royal-gold-light); }

.glossary-aliases {
    margin: 0 0 8px;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 15px;
    color: var(--court-secondary);
}

.glossary-text {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--parchment);
}

.glossary-text p { margin: 0 0 8px; }

.glossary-link { margin: 8px 0 0; }

.glossary-link a {
    font: 600 11px 'Cinzel', Georgia, serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--royal-gold);
}

.glossary-link a:hover,
.glossary-link a:focus-visible { color: var(--royal-gold-light); }

.glossary-empty {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 17px;
    color: var(--court-secondary);
}

.glossary-main .spoiler-row { margin-top: 8px; }

@media (max-width: 600px) {
    .glossary-group { grid-template-columns: minmax(0, 1fr); }
    .glossary-letter { font-size: 26px; padding: 0 0 4px; }
}
