/* The Elfin Oak Glossary */
.gl-wrap { max-width: 980px; }
.gl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gl-tools { display: flex; align-items: center; justify-content: center; gap: 0.7rem 1.2rem; flex-wrap: wrap; margin: 0 auto 1.3rem; }
.gl-search { position: relative; flex: 1 1 300px; max-width: 460px; display: block; }
.gl-search::before { content: "\2726"; position: absolute; left: 1.15rem; top: 50%; transform: translateY(-50%); color: var(--gold); font-size: 0.95rem; pointer-events: none; }
.gl-search input { width: 100%; padding: 0.85rem 1.2rem 0.85rem 2.9rem; border-radius: 999px; border: 1px solid rgba(245,200,66,0.45); background: rgba(7,12,24,0.62);
  color: var(--cream); font-family: var(--serif-body); font-size: 1.1rem; outline: none; -webkit-appearance: none; appearance: none; transition: border-color 0.25s, box-shadow 0.25s; }
.gl-search input::placeholder { color: rgba(255,252,234,0.5); }
.gl-search input:focus { border-color: var(--gold); box-shadow: 0 0 22px rgba(245,200,66,0.28); }
.gl-count { font-family: var(--caps); font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin: 0; white-space: nowrap; }

.gl-alpha { position: sticky; top: 62px; z-index: 60; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.38rem; padding: 0.7rem 0.8rem; margin: 0 0 2rem;
  background: rgba(8,13,25,0.88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(245,200,66,0.22); border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,0.45); }
.gl-alpha a { flex: 0 0 auto; width: 2.15rem; height: 2.15rem; display: grid; place-items: center; border-radius: 50%; font-family: var(--serif-display); font-weight: 600; font-size: 1.2rem; line-height: 1;
  color: var(--cream); border: 1px solid rgba(245,200,66,0.3); transition: background 0.2s, color 0.2s, transform 0.2s, opacity 0.2s; }
.gl-alpha a:hover, .gl-alpha a:focus-visible, .gl-alpha a.on { background: var(--gilt); color: #241703; border-color: #fff0b8; transform: translateY(-1px); }
.gl-alpha a.off { opacity: 0.28; pointer-events: none; }

.gl-letter { margin: 0 0 2.6rem; padding: 0; scroll-margin-top: 178px; }
.gl-letter[hidden] { display: none; }
.gl-letter h2 { display: flex; align-items: center; gap: 1.1rem; margin: 0 0 1rem; }
.gl-letter h2 span { flex: 0 0 auto; width: 3.4rem; height: 3.4rem; display: grid; place-items: center; border-radius: 50%; font-family: var(--serif-display); font-weight: 600; font-size: 2.2rem; line-height: 1; color: #241703;
  background: var(--gilt); box-shadow: 0 0 26px rgba(245,200,66,0.4), inset 0 0 0 2px rgba(255,255,255,0.35); }
.gl-letter h2::after { content: ""; flex: 1 1 auto; height: 1px; background: linear-gradient(90deg, rgba(245,200,66,0.6), rgba(245,200,66,0)); }
.gl-list { display: grid; gap: 0.75rem; margin: 0; }
.gl-entry { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.3rem 1rem; padding: 1rem 1.25rem 1.1rem; border-radius: 16px; scroll-margin-top: 190px;
  background: linear-gradient(180deg, rgba(22,38,63,0.78), rgba(11,20,36,0.78)); border: 1px solid rgba(245,200,66,0.16); transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s; }
.gl-entry[hidden] { display: none; }
.gl-entry:hover { border-color: rgba(245,200,66,0.45); box-shadow: 0 0 26px rgba(245,200,66,0.12); }
.gl-entry:target { border-color: var(--gold); box-shadow: 0 0 34px rgba(245,200,66,0.3); }
.gl-entry dt { font-family: var(--serif-display); font-weight: 600; font-size: 1.7rem; line-height: 1.15; color: #ffe9a8; text-shadow: 0 0 18px rgba(245,200,66,0.25); }
.gl-ref { margin: 0; font-family: var(--caps); font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); border: 1px solid rgba(245,200,66,0.42); border-radius: 999px; padding: 0.3rem 0.75rem; white-space: nowrap; }
.gl-def { grid-column: 1 / -1; margin: 0; color: var(--cream-dim); font-size: 1.08rem; line-height: 1.6; }
.gl-mean { color: var(--cream); }
.gl-back { margin: 0.9rem 0 0; text-align: right; font-family: var(--caps); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; }
.gl-back a { color: var(--gold); }
.gl-back a:hover { color: #ffe9a8; }
.gl-none { text-align: center; color: var(--cream-dim); font-style: italic; margin: 1rem 0 2.4rem; }
.gl-none[hidden] { display: none; }
.gl-after { text-align: center; }
.gl-page.gl-searching .gl-back { display: none; }
.gl-page.gl-searching .gl-letter { margin-bottom: 1.4rem; }

@media (max-width: 700px) {
  .gl-alpha { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; border-radius: 14px; padding: 0.55rem 0.6rem; top: 60px; margin-bottom: 1.5rem; }
  .gl-alpha::-webkit-scrollbar { display: none; }
  .gl-alpha a { width: 2.3rem; height: 2.3rem; }
  .gl-letter h2 span { width: 2.9rem; height: 2.9rem; font-size: 1.9rem; }
  .gl-letter { scroll-margin-top: 132px; } .gl-entry { scroll-margin-top: 140px; }
  .gl-entry { padding: 0.9rem 1rem 1rem; }
  .gl-entry dt { font-size: 1.5rem; }
  .gl-def { font-size: 1.04rem; }
  .gl-count { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .gl-alpha a, .gl-entry { transition: none; } }
@media print {
  .doc-nav, .gl-tools, .gl-alpha, .gl-back, .doc-foot .f-cols, .skip-link { display: none !important; }
  body.doc-page { background: #fff; color: #000; }
  .gl-entry { background: none; border: 0; border-bottom: 1px solid #ccc; border-radius: 0; break-inside: avoid; padding: 0.4rem 0; }
  .gl-entry dt, .gl-def, .gl-mean, .gl-ref, .doc-title, .kingdom-sub, .kicker { color: #000 !important; text-shadow: none; -webkit-text-fill-color: #000; background: none; }
  .gl-letter h2 span { background: none; box-shadow: none; color: #000; }
}

/* v148 · phones and tablets: readable page labels */
@media (max-width: 1200px) { .gl-ref { font-size: 0.68rem; letter-spacing: 0.14em; } }
