/* Glossary (/glossary/): A–Z bar pinned at the top, terms in columns. Site tokens from design.css. */

body:not(.home) .entry-content > .jbg.jbg { max-width: none !important; margin-inline: auto; } /* beats an old page-id-38 rule in design.css */
.jbg { display: grid; gap: 8px; color: var(--cream-100); }
.entry-content .jbg p { margin: 0; }
.jbg a:focus-visible, .jbg input:focus-visible { outline: 2px solid var(--glow-500); outline-offset: 2px; }
.jbg-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* pinned A–Z + search */
.jbg-bar {
	position: sticky;
	top: 0; /* the site header scrolls away */
	z-index: 5;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 12px 24px;
	align-items: center;
	padding: 12px 16px;
	margin-bottom: 16px;
	background: var(--ink-900);
	border: 1px solid var(--ink-border);
	border-radius: var(--r-card);
	box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
}
.jbg-az { display: flex; flex-wrap: wrap; gap: 3px; }
.jbg-az a, .jbg-az span { display: inline-grid; place-items: center; min-width: 30px; height: 36px; font: 400 14px/1 'Space Mono', monospace; border-radius: 8px; }
.jbg-az a { color: var(--cream-100) !important; text-decoration: none; border: 1px solid var(--ink-border); }
.jbg-az a:hover { border-color: var(--glow-500); color: var(--glow-300) !important; }
.jbg-az a[aria-current] { border-color: var(--glow-500); color: var(--glow-300) !important; background: var(--pool-soft); }
.jbg-az span { color: var(--cream-400); opacity: .45; }
.jbg-find { position: relative; }
.jbg-find input { width: 100%; height: 44px; margin: 0; padding: 0 64px 0 14px; font: inherit; font-size: 15px; color: var(--cream-100); background: var(--ink-950); border: 1px solid var(--glow-700); border-radius: var(--r-input); box-shadow: none; }
.jbg-find input::placeholder { color: var(--cream-400); opacity: 1; }
.jbg-count { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 400 12px/1 'Space Mono', monospace; color: var(--cream-400); }

/* letters + terms */
.jbg-letter { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 0 24px; padding: 20px 0; border-top: 1px solid var(--hairline); scroll-margin-top: 118px; }
.jbg-letter[hidden] { display: none; }
.entry-content .jbg .jbg-l { margin: 0; font: 400 52px/1 'Lora', serif; color: var(--glow-300); position: sticky; top: 118px; align-self: start; }
.jbg-terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 32px; }
.jbg-term { display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 118px; }
.jbg-term[hidden] { display: none; }
.jbg-term:target .jbg-t { color: var(--glow-300); }
.entry-content .jbg .jbg-t { margin: 0; font: 400 22px/1.25 'Lora', serif; color: var(--cream-100); }
.entry-content .jbg .jbg-def { font-size: 15.5px; line-height: 1.6; color: var(--cream-100); }
.entry-content .jbg .jbg-ex { font-size: 14px; line-height: 1.55; color: var(--cream-400); }
.jbg-ex span { font: 400 11px/1.4 'Space Mono', monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--glow-300); margin-right: 4px; }
.jbg-more { font: 400 12px/1.5 'Space Mono', monospace; letter-spacing: .04em; text-transform: uppercase; color: var(--glow-300) !important; text-decoration: none; }
.jbg-more:hover { text-decoration: underline; }
.entry-content .jbg .jbg-none { padding: 32px 0; color: var(--cream-400); }
.jbg-none a { color: var(--glow-300); }

@media (max-width: 1100px) { .jbg-terms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
	.jbg-bar { grid-template-columns: minmax(0, 1fr); }
	.jbg-az { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
	.jbg-az a, .jbg-az span { flex: 0 0 auto; }
	.jbg-letter { grid-template-columns: minmax(0, 1fr); scroll-margin-top: 130px; }
	.entry-content .jbg .jbg-l { position: static; font-size: 40px; margin-bottom: 8px; }
	.jbg-term { scroll-margin-top: 130px; }
}
@media (max-width: 560px) {
	.jbg-bar { padding: 10px; }
	.jbg-terms { grid-template-columns: minmax(0, 1fr); }
}

/* the letter strip scrolls sideways on narrow screens; hide its scrollbar (swipe still works) */
@media (max-width: 900px) { .jbg-az { scrollbar-width: none; } .jbg-az::-webkit-scrollbar { display: none; } }
