.terms-home-nav { margin-left: auto; display: flex; gap: 24px; font-size: .8rem; }
.terms-home-nav a { text-decoration: none; color: var(--muted); }
.terms-home-nav [aria-current] { color: var(--text); }
.terms-page { max-width: 1200px; margin: auto; padding: 40px clamp(16px, 3vw, 44px) 64px; }
.terms-page > h1 { margin-bottom: 32px; }
.terms-layout { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); }
[hidden] { display: none !important; }
.terms-selector { position: sticky; top: 92px; align-self: start; }
.terms-nav { max-height: calc(100dvh - 120px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; border: 1px solid var(--line); padding: 12px; }
.terms-letter { margin: 12px 0 4px; padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .8rem; letter-spacing: .2em; }
.terms-link { display: block; padding: 10px; text-decoration: none; overflow-wrap: anywhere; font-size: .9rem; border-left: 2px solid transparent; }
.terms-link:hover { background: #161616; }
.terms-link[aria-current] { border-color: var(--text); background: #242424; color: white; }
.terms-toggle { display: none; }
.term-content { min-width: 0; scroll-margin-top: 150px; }
.term-content h2 { font-size: clamp(2rem, 4vw, 3.4rem); overflow-wrap: anywhere; }
.term-content h3 { margin: 32px 0 12px; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .16em; }
.term-prose { white-space: pre-wrap; line-height: 1.8; }
.term-song { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.term-song h4 { margin: 0; font-size: 1rem; }
.term-album { color: var(--muted); margin: 4px 0 12px; }
.term-citation { position: relative; display: inline; text-decoration: none; color: white; padding: 3px 2px; scroll-margin-top: 95px; }
.citation-tooltip { display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); width: min(270px, 75vw); padding: 10px 12px; background: #242424; border: 1px solid var(--line-bright); border-radius: 4px; color: var(--text); font-size: .75rem; line-height: 1.5; white-space: normal; z-index: 5; }
@media (hover: hover) { .term-citation:hover .citation-tooltip { display: block; } }
.term-citation:focus-visible .citation-tooltip { display: block; }
.term-sources { padding-left: 0; list-style: none; }
.term-sources li { padding: 16px 12px; border-top: 1px solid var(--line); scroll-margin-top: 95px; overflow-wrap: anywhere; }
.term-sources li:target { background: #242424; outline: 1px solid var(--line-bright); }
.source-meta { display: block; color: var(--muted); font-size: .85rem; margin-top: 4px; }
a:focus-visible, button:focus-visible { outline: 2px solid white; outline-offset: 3px; }
@media (max-width: 800px) {
  .terms-home-nav { gap: 14px; font-size: .72rem; }
  .terms-layout { display: block; }
  .terms-selector { position: sticky; top: 60px; z-index: 10; background: var(--bg); margin-bottom: 28px; }
  .terms-toggle { display: flex; justify-content: space-between; width: 100%; padding: 16px; border: 1px solid var(--line-bright); background: var(--panel); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
  .terms-nav { display: none; max-height: calc(100dvh - 140px); touch-action: pan-y; }
  .terms-selector.open .terms-nav { display: block; }
  .terms-link { padding: 13px 10px; }
  .term-content h2 { font-size: 2.3rem; }
  .term-sources li { scroll-margin-top: 150px; }
}
