/* ── ISBE Encyclopedia Modal ───────────────────────────────── */

.isbe-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10200;
    display: none;
    align-items: center;
    justify-content: center;
}
.isbe-backdrop.visible { display: flex; }

.isbe-modal {
    width: 95vw;
    height: 92vh;
    background: var(--background, #FAF9F6);
    /* corners: .modal-shell (css/modal-header.css) */
    box-shadow: 0 25px 50px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header bar: the one header bar (css/modal-header.css) — nothing of its own. */

/* ── Body ────────────────────────────────────────────────── */

.isbe-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ── Nav Rail ───────────────────────────────────────────── */

.isbe-nav-rail {
    width: var(--nav-rail-width, 110px);
    min-width: var(--nav-rail-width, 110px);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border, #e2e8f0);
    background: var(--background, #FAF9F6);
    overflow-y: auto;
    padding: 0.25rem 0;
}

/* Rail buttons inherit the app's ONE .icon-nav-btn card styling
   (surface background, border, hover, active) — identical menus in
   light and dark, desktop and mobile. Only ISBE-specific layout here. */
.isbe-nav-rail .icon-nav-btn {
    justify-content: center;
    gap: 0.25rem;
    font-size: 0.65rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.isbe-nav-rail .icon-nav-btn svg { width: 22px; height: 22px; }
.isbe-nav-rail .icon-nav-divider {
    width: 60%;
    height: 1px;
    background: var(--border, #e2e8f0);
    margin: 4px auto;
}

/* ── Content Area ────────────────────────────────────────── */

.isbe-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface, #fff);
}

.isbe-content-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 1rem;
    border-bottom: 1px solid var(--border, #e2e8f0);
    flex-shrink: 0;
    gap: 0.5rem;
}

.isbe-nav-btn {
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    background: var(--surface, #fff);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
}
.isbe-nav-btn:hover { background: var(--highlight, #f0f0ea); }
.isbe-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.isbe-ref-display {
    display: inline-flex;
    align-items: baseline;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 1rem;
    flex: 1;
    min-width: 0;
    justify-content: center;
}
.isbe-ref-segment {
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.isbe-ref-segment:hover {
    color: var(--primary, #5B4B8A);
    background: rgba(91, 75, 138, 0.07);
}
.isbe-ref-dot {
    color: var(--text-secondary);
    padding: 0 0.15rem;
    font-size: 0.8rem;
}

/* ── Reading Area ───────────────────────────────────────── */

.isbe-reading-area {
    flex: 1;
    overflow-y: auto;
    padding: 1.1rem 2rem 2rem;
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-primary, #2C2416);
}

/* Article elements */
/* Header row: title left, toolbar right, ONE line on desktop */
.isbe-article-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border-light, rgba(0,0,0,0.06));
}
.isbe-article-header .isbe-article-title {
    flex: 1;
    min-width: 0;
    margin: 0;
}
.isbe-article-header .isbe-article-toolbar {
    margin: 0;
    padding: 0;
    border-bottom: none;
    flex-shrink: 0;
}
.isbe-article-title {
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.15; /* NOT the reading area's 1.7 — that was ~40px of dead air */
    margin: 0;
    color: var(--text-primary, #2C2416);
    letter-spacing: 0.01em;
}
.isbe-article-pronunciation {
    font-style: italic;
    color: var(--text-secondary, #6B5D54);
    font-size: 0.95rem;
    margin-bottom: 0.85rem;
}
.isbe-article-meta {
    font-size: 0.75rem;
    color: var(--text-secondary, #6B5D54);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.isbe-article-redirect-note {
    background: var(--highlight, #f0f0ea);
    border-left: 3px solid var(--primary, #5B4B8A);
    padding: 0.5rem 0.85rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary, #6B5D54);
    border-radius: 0 6px 6px 0;
}

.isbe-article-body p {
    margin: 0 0 0.85rem;
}

/* ── Master TOC block — same isbe-toc-dN language as the book-intro TOCs
   (intro-overlay.css), ISBE-blue accent in the modal context. Replaces the
   flat full-width <p> sprawl of the 1915 print TOC dump. ── */
.isbe-toc-block {
    padding: 0.6rem 0.85rem;
    margin: 0 0 1.25rem;
    background: rgba(74, 111, 165, 0.06);
    border-left: 3px solid var(--accent-isbe, #4A6FA5);
    border-radius: 0 6px 6px 0;
    font-size: 0.82rem;
}
.isbe-toc-block .isbe-toc-line {
    margin: 0.18rem 0;
    line-height: 1.35;
}
.isbe-toc-block .isbe-toc-d0 { margin-top: 0.5rem; font-weight: 700; }
.isbe-toc-block .isbe-toc-d0:first-child { margin-top: 0; }
.isbe-toc-block .isbe-toc-d1 { padding-left: 1rem; }
.isbe-toc-block .isbe-toc-d2 { padding-left: 2rem; font-size: 0.78rem; }
.isbe-toc-block .isbe-toc-d3 { padding-left: 3rem; font-size: 0.76rem; color: var(--text-secondary, #555); }
.isbe-toc-block .isbe-toc-d4 { padding-left: 4rem; font-size: 0.74rem; color: var(--text-secondary, #777); }
/* Dark: stronger tint so the block reads as a panel on the dark ground */
[data-theme="dark"] .isbe-toc-block {
    background: rgba(74, 111, 165, 0.16);
}
.isbe-article-body .isbe-section {
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary, #5B4B8A);
    margin: 1.35rem 0 0.5rem;
    scroll-margin-top: 8px;
}
.isbe-article-body a[data-isbe-article] {
    color: var(--primary, #5B4B8A);
    text-decoration: none;
    border-bottom: 1px dotted var(--primary, #5B4B8A);
    cursor: pointer;
}
.isbe-article-body a[data-isbe-article]:hover {
    background: rgba(91, 75, 138, 0.08);
}
.isbe-article-body a[data-isbe-jump] {
    color: var(--primary, #5B4B8A);
    text-decoration: none;
    cursor: pointer;
}
.isbe-article-body a[data-isbe-jump]:hover { text-decoration: underline; }

/* Unresolvable "see X" pointer — render dim/italic so it doesn't look like a dead link */
.isbe-unresolved-ref {
    color: var(--text-secondary, #6B5D54);
    font-style: italic;
    opacity: 0.75;
}

/* ── Sidebar ─────────────────────────────────────────── */

.isbe-sidebar {
    width: 0;
    overflow: hidden;
    border-left: none;
    background: var(--surface, #fff);
    transition: width 0.25s ease;
}
.isbe-sidebar.open {
    width: 380px;
    border-left: 1px solid var(--border, #e2e8f0);
    overflow-y: auto;
}

/* ── Letter Picker (uses .nav-picker-* shared classes from styles.css) ─ */

.isbe-letter-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
    padding: 0.75rem;
}
.isbe-letter-grid button {
    padding: 0.85rem 0;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    background: var(--surface, #fff);
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.isbe-letter-grid button:hover {
    background: var(--highlight, #f0f0ea);
    transform: translateY(-1px);
}
.isbe-letter-grid button.current {
    background: linear-gradient(135deg, var(--primary, #5B4B8A) 0%, var(--primary-dark, #4A3B73) 100%);
    color: #fff;
    border-color: transparent;
}
.isbe-letter-grid button .isbe-letter-count {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.75;
    margin-top: 0.15rem;
}

.isbe-letter-search {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--surface, #fff);
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border, #e2e8f0);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.isbe-letter-search-icon {
    width: 16px;
    height: 16px;
    color: var(--text-secondary, #6B5D54);
    flex-shrink: 0;
}
.isbe-letter-search-input {
    flex: 1;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
    background: var(--background, #FAF9F6);
    color: var(--text-primary);
    font-family: inherit;
}
.isbe-letter-search-input:focus {
    outline: none;
    border-color: var(--primary, #5B4B8A);
    background: var(--surface, #fff);
    box-shadow: 0 0 0 3px rgba(91, 75, 138, 0.12);
}
.isbe-letter-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary, #6B5D54);
    font-size: 1.2rem;
    padding: 0 0.3rem;
    line-height: 1;
    border-radius: 4px;
}
.isbe-letter-search-clear:hover {
    color: var(--text-primary);
    background: var(--highlight, #f0f0ea);
}
.isbe-letter-list-wrap { padding-bottom: 0.5rem; }

.isbe-article-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    max-height: 70vh;
    overflow-y: auto;
}
.isbe-article-list-item {
    text-align: left;
    padding: 0.55rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.12s;
}
.isbe-article-list-item:hover {
    background: var(--highlight, #f0f0ea);
    border-color: var(--border, #e2e8f0);
}
.isbe-article-list-item.current {
    background: linear-gradient(135deg, var(--primary, #5B4B8A) 0%, var(--primary-dark, #4A3B73) 100%);
    color: #fff;
}
.isbe-article-list-item .isbe-article-list-title {
    font-weight: 600;
    display: block;
}
.isbe-article-list-item .isbe-article-list-summary {
    display: block;
    font-size: 0.78rem;
    opacity: 0.75;
    margin-top: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.isbe-article-list-item.is-redirect {
    font-style: italic;
    opacity: 0.85;
}

/* ── Article toolbar (tag dots + action buttons) ──────── */

.isbe-article-toolbar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.3rem 0 0.85rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border-light, rgba(0,0,0,0.06));
}
.isbe-article-tag-dots {
    display: flex;
    gap: 3px;
    align-items: center;
    margin-right: auto;
}
.isbe-article-tag-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

/* ── Highlight marks in article body ──────────────────── */

.isbe-article-body mark[class^="hl-"] {
    padding: 1px 2px;
    border-radius: 2px;
}
mark.hl-yellow { background: rgba(255, 235, 59, 0.55); }
mark.hl-green  { background: rgba(76, 175, 80, 0.45); }
mark.hl-blue   { background: rgba(66, 165, 245, 0.45); }
mark.hl-red    { background: rgba(229, 115, 115, 0.45); }
mark.hl-orange { background: rgba(255, 152, 0, 0.45); }
mark.hl-purple { background: rgba(171, 71, 188, 0.40); }

/* ── Tag-sidebar ISBE ref (mirrors .tag-library-ref in library-modal.css) */
.tag-isbe-ref {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--text-primary);
    transition: background 0.12s;
}
.tag-isbe-ref:hover {
    background: var(--highlight);
    color: var(--primary);
}
.tag-isbe-unassign {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary);
    opacity: 0;
    padding: 0 2px;
    line-height: 1;
    margin-left: auto;
    flex-shrink: 0;
}
.tag-isbe-ref:hover .tag-isbe-unassign { opacity: 1; }
.tag-isbe-unassign:hover { color: var(--danger); }

/* Flash toast */
.isbe-flash-toast {
    position: fixed;
    bottom: 32px; left: 50%;
    transform: translateX(-50%);
    background: rgba(40, 40, 40, 0.92);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 30000;
    pointer-events: none;
    animation: isbe-toast-fade 1.5s ease;
}
@keyframes isbe-toast-fade {
    0% { opacity: 0; transform: translate(-50%, 10px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -10px); }
}

/* ── Search Sidebar ───────────────────────────────────── */

.isbe-search-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.isbe-search-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--surface, #fff);
    padding: 0.75rem 0.75rem 0.6rem;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.isbe-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.isbe-search-icon {
    position: absolute;
    left: 0.6rem;
    width: 16px;
    height: 16px;
    color: var(--text-secondary, #6B5D54);
    pointer-events: none;
}
.isbe-search-input {
    flex: 1;
    padding: 0.55rem 2.1rem 0.55rem 2rem;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    background: var(--background, #FAF9F6);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: inherit;
    width: 100%;
}
.isbe-search-input:focus {
    outline: none;
    border-color: var(--primary, #5B4B8A);
    background: var(--surface, #fff);
    box-shadow: 0 0 0 3px rgba(91, 75, 138, 0.12);
}
.isbe-search-clear {
    position: absolute;
    right: 0.4rem;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary, #6B5D54);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.isbe-search-clear:hover {
    background: var(--highlight, #f0f0ea);
    color: var(--text-primary);
}
.isbe-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.5rem 1rem;
}
.isbe-search-count {
    padding: 0.4rem 0.5rem 0.6rem;
    font-size: 0.72rem;
    color: var(--text-secondary, #6B5D54);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.isbe-search-result {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.25rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s;
    font-family: inherit;
}
.isbe-search-result:hover,
.isbe-search-result:focus {
    background: var(--highlight, #f0f0ea);
    border-color: var(--border, #e2e8f0);
    outline: none;
}
.isbe-search-result-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.isbe-search-redirect-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--highlight, #f0f0ea);
    color: var(--text-secondary, #6B5D54);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.isbe-search-result-summary {
    font-size: 0.8rem;
    color: var(--text-secondary, #6B5D54);
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.isbe-search-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--text-secondary, #6B5D54);
    font-size: 0.88rem;
}

/* ── Omnipresent header search ─────────────────────────── */

.isbe-header-search {
    flex: 0 0 220px;
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 0.5rem;
}
.isbe-header-search input {
    width: 100%;
    padding: 0.3rem 0.6rem 0.3rem 1.85rem;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    background: var(--background, #FAF9F6);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
}
.isbe-header-search input:focus {
    outline: none;
    border-color: var(--primary, #5B4B8A);
    background: var(--surface, #fff);
    box-shadow: 0 0 0 3px rgba(91, 75, 138, 0.12);
}
.isbe-header-search svg {
    position: absolute;
    left: 0.45rem;
    width: 14px;
    height: 14px;
    color: var(--text-secondary, #6B5D54);
    pointer-events: none;
}
.isbe-header-search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    max-height: 50vh;
    overflow-y: auto;
    z-index: 10310;
    display: none;
}
.isbe-header-search-dropdown.open { display: block; }
.isbe-header-search-dropdown .isbe-search-result {
    margin: 0;
    border-radius: 0;
    border-top: 1px solid var(--border-light, rgba(0,0,0,0.06));
}
.isbe-header-search-dropdown .isbe-search-result:first-child { border-top: none; }

/* ── Empty State ──────────────────────────────────────── */

.isbe-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem;
}
.isbe-empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.isbe-empty-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-family: 'Crimson Text', Georgia, serif;
}
.isbe-empty-text {
    font-size: 0.9rem;
    max-width: 380px;
    line-height: 1.6;
}
.isbe-empty-hint {
    margin-top: 1.25rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    background: var(--highlight, #f0f0ea);
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
}

/* ── Mobile ───────────────────────────────────────────── */

/* Full title on desktop, "ISBE" on mobile */
.isbe-title-short { display: none; }

@media (max-width: 768px) {
    .isbe-modal { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; }
    .isbe-title-full { display: none; }
    .isbe-title-short { display: inline; }

    .isbe-body { flex-direction: column; }

    .isbe-nav-rail {
        width: 100%;
        min-width: unset;
        flex-direction: row;
        border-left: none;
        border-top: 1px solid var(--border, #e2e8f0);
        order: 2;
        flex-shrink: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 0;
    }
    .isbe-nav-rail .icon-nav-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 0.4rem 0.6rem;
        margin: 2px;
    }
    .isbe-nav-rail .icon-nav-btn .icon-nav-label { display: none; }
    .isbe-nav-rail .icon-nav-divider {
        width: 1px;
        height: 60%;
        align-self: center;
        margin: 0 2px;
    }

    .isbe-content { order: 1; flex: 1; min-height: 0; }

    .isbe-content-nav { padding: 0.3rem 0.5rem; gap: 0.3rem; }
    .isbe-content-nav.collapsed .isbe-ref-display {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        max-width: 100%;
        font-size: 0.85rem;
    }
    .isbe-content-nav.collapsed .isbe-ref-dot { display: none; }
    .isbe-content-nav.collapsed .isbe-nav-btn { display: none; }

    .isbe-reading-area { padding: 0.75rem 1rem 1rem; font-size: 1rem; }
    /* Phones: header stacks — title full width, toolbar left-justified beneath it */
    .isbe-article-header { flex-wrap: wrap; gap: 0.3rem 0.75rem; }
    .isbe-article-header .isbe-article-title { flex: 1 1 100%; }
    .isbe-article-header .isbe-article-toolbar { margin-right: auto; }
    /* TOC block: shallower indents so deep levels don't crush narrow screens */
    .isbe-toc-block { font-size: 0.8rem; }
    .isbe-toc-block .isbe-toc-d1 { padding-left: 0.75rem; }
    .isbe-toc-block .isbe-toc-d2 { padding-left: 1.5rem; }
    .isbe-toc-block .isbe-toc-d3 { padding-left: 2.1rem; }
    .isbe-toc-block .isbe-toc-d4 { padding-left: 2.7rem; }
    .isbe-article-title { font-size: 1.5rem; }

    .isbe-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        height: 100dvh;
        z-index: 10250;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        background: var(--background, #FAF9F6);
    }
    .isbe-sidebar.open {
        width: 88vw;
        max-width: 420px;
        transform: translateX(0);
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    }
    .isbe-sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.3);
        z-index: 10249;
    }
    .isbe-sidebar-backdrop.visible { display: block; }

    .isbe-letter-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.4rem;
    }
}

/* ── Homonym glosses (FEAT: numbered-title labels, 2026-09-08) ─────────
   The 1915 ISBE numbers same-name articles ("Judah (1)", "Judah (2)");
   the gloss says WHICH one — rendered after the title in the letter
   list, search results, and the article header. Gold = wayfinding. */
.isbe-gloss {
    font-family: 'Crimson Text', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    color: var(--gold-text, #8a6a00);
    margin-left: 0.45rem;
}
.isbe-gloss::before {
    content: "— ";
}
.isbe-article-list-item.current .isbe-gloss {
    color: inherit;
    opacity: 0.85;
}
.isbe-search-result-title .isbe-gloss {
    font-size: 0.88rem;
}
.isbe-article-gloss {
    font-family: 'Crimson Text', Georgia, serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--gold-text, #8a6a00);
    margin: 0.15rem 0 0.35rem;
}

