/* ── Glossary term inline styling ── */

.glossary-term {
    position: relative;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: var(--gold-light);
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.glossary-term:hover,
.glossary-term:focus {
    color: var(--gold-light);
    outline: none;
}

/* ── Tooltip ── */

.glossary-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    padding: 0.9rem 1rem;
    background: var(--ink, #1a1108);
    border: 1px solid var(--gold-light, #c8a94e);
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    text-align: left;
}

.glossary-tooltip.visible {
    opacity: 1;
    pointer-events: auto;
}

.glossary-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--gold-light, #c8a94e);
}

.glossary-tooltip-type {
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold-light, #c8a94e);
    margin-bottom: 0.25rem;
}

.glossary-tooltip-name {
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--parchment, #f5f0e8);
    margin-bottom: 0.4rem;
}

.glossary-tooltip-desc {
    font-family: 'EB Garamond', serif;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--parchment, #f5f0e8);
    opacity: 0.9;
    margin-bottom: 0.6rem;
}

.glossary-tooltip-link {
    display: inline-block;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gold-light, #c8a94e);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.glossary-tooltip-link:hover {
    opacity: 0.7;
}

/* ── Glossary page ── */

.glossary-section {
    margin-bottom: 2.5rem;
}

.glossary-section h2 {
    border-bottom: 1px solid var(--gold-light, #c8a94e);
    padding-bottom: 0.4rem;
    margin-bottom: 1.2rem;
}

.glossary-entry {
    margin-bottom: 1.8rem;
    scroll-margin-top: 2rem;
}

.glossary-entry-name {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold-light, #c8a94e);
    margin: 0 0 0.3rem 0;
}

.glossary-entry-type {
    font-family: 'EB Garamond', serif;
    font-size: 0.85rem;
    font-style: italic;
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.glossary-entry-body {
    font-family: 'EB Garamond', serif;
    font-size: 1rem;
    line-height: 1.6;
}
