/* ============ PAGE 5 — Notes, Sources & Glossary (pairs with /30, /60, /90) ============ */
html, body { overflow-x: hidden; }
.topbar-actions { display: flex; align-items: center; gap: var(--space-4); }
.back-link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
}
@media (hover: hover) { .back-link:hover { color: var(--color-text); background: var(--color-surface-offset); } }

.intro-body-static {
  padding: var(--space-4) var(--space-6) var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 68ch;
}
.intro-body-static strong { color: var(--color-text); font-weight: 600; }

.yogi-quote {
  position: relative;
  margin: 0;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 18px -8px rgba(10, 30, 45, 0.35), inset 0 0 0 1px rgba(255,236,205,0.18), inset 0 -10px 16px -10px rgba(40,20,5,0.45), inset 0 8px 12px -10px rgba(255,240,215,0.35);
  background-color: #9c7850;
  background-size: cover;
  background-position: center;
}
.yogi-final { background-image: url("/30/assets/driftwood-quote2.jpg"); margin-top: var(--space-6); text-align: center; }
.yogi-quote::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(40,22,8,0.32), rgba(30,16,5,0.48));
  pointer-events: none;
}
.yogi-quote > * { position: relative; z-index: 1; }
.yogi-quote p {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  font-style: italic;
  color: #fffaf2;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6), 0 0 8px rgba(30,15,5,0.45);
}
.yogi-quote cite {
  display: block;
  font-style: normal;
  font-size: var(--text-xs);
  color: #f3e6d2;
  opacity: 0.95;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}

/* ============ CLOSING BOOKEND ============ */
.closing-bookend {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) 0 var(--space-2);
  color: var(--color-text-faint);
}
.closing-bookend-text {
  font-family: var(--font-display, inherit);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-text-faint);
  margin: 0;
}

.report-footer {
  padding: var(--space-6) 0 var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-align: center;
}
.report-footer .footer-credit { margin-top: var(--space-2); font-size: var(--text-xs); color: var(--color-text-faint); opacity: 0.7; }

@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; gap: var(--space-2); }
  .back-link { padding: var(--space-1) var(--space-2); }
}

@media (max-width: 640px) {
  .holdings-table td:first-child { min-width: 132px; }
}

/* Two pair pills + back link + theme toggle on one row on narrow phones. */
@media (max-width: 420px) {
  .topbar-actions { gap: 6px; }
  .topbar-actions .pair-link { padding-inline: var(--space-2); }
  .topbar-actions .back-link { padding-inline: var(--space-2); font-size: var(--text-xs); }
}
.bl-short { display: none; }
@media (max-width: 440px) { .bl-long { display: none; } .bl-short { display: inline; } }

/* ============ PAGE 5: Notes, Sources & Glossary ============ */
html { scroll-padding-top: 88px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.toc { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.toc a, .chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-3); border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); font-size: var(--text-sm); font-weight: 500; text-decoration: none; }
.toc a:hover, .chip:hover { border-color: var(--brand-log-color, #a9713f); }
.toc a:focus-visible, .chip:focus-visible, .gloss-filter:focus-visible { outline: 2px solid var(--brand-log-color, #a9713f); outline-offset: 2px; }
.prose p { margin: 0 0 var(--space-3); max-width: 70ch; line-height: 1.6; }
.prose p:last-child { margin-bottom: 0; }
.gloss-tools { margin: var(--space-3) 0 var(--space-2); }
.gloss-filter { width: 100%; max-width: 420px; min-height: 44px; padding: 0 var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); font: inherit; font-size: 16px; }
.gloss-count { margin: var(--space-1) 0 0; font-size: var(--text-xs); color: var(--color-text-faint); }
.chip-row { display: flex; gap: var(--space-2); overflow-x: auto; padding: var(--space-1) 0 var(--space-3); -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.chip { flex: 0 0 auto; white-space: nowrap; }
.gloss-group { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; margin: var(--space-5) 0 var(--space-2); padding-bottom: var(--space-1); border-bottom: 2px solid var(--brand-log-end-color, #d9a066); }
.gloss-list { margin: 0; }
.gloss-item { padding: var(--space-3) 0; border-bottom: 1px solid var(--color-divider, var(--color-border)); }
.gloss-item:target { background: color-mix(in srgb, var(--brand-log-end-color, #d9a066) 16%, transparent); border-radius: var(--radius-md); padding-inline: var(--space-2); }
.gloss-item dt { font-weight: 700; font-size: var(--text-base); margin-bottom: var(--space-1); }
.gloss-item dd { margin: 0; }
.gloss-item dd p { margin: 0 0 var(--space-1); line-height: 1.55; max-width: 70ch; }
.on-dw { font-size: var(--text-sm); color: var(--color-text-muted); }
.on-dw span { font-weight: 600; color: var(--brand-log-color, #a9713f); }
[data-theme="dark"] .on-dw span { color: var(--brand-log-end-color, #d9a066); }
.gloss-empty { color: var(--color-text-muted); font-size: var(--text-sm); }
.note-ref { font-size: 0.72em; line-height: 0; margin-left: 1px; }
.note-ref a { display: inline-block; padding: 0 2px; min-width: 1.1em; text-align: center; color: var(--brand-log-color, #a9713f); font-weight: 600; text-decoration: none; position: relative; }
.note-ref a::after { content: ''; position: absolute; left: 50%; top: 50%; width: 32px; height: 32px; transform: translate(-50%, -50%); }
[data-theme="dark"] .note-ref a { color: var(--brand-log-end-color, #d9a066); }
.notes-list { margin: var(--space-2) 0 0; padding-left: 1.6em; }
.notes-list li, .bib-list li { font-size: var(--text-sm); line-height: 1.55; margin-bottom: var(--space-2); overflow-wrap: anywhere; }
.notes-list li:target { background: color-mix(in srgb, var(--brand-log-end-color, #d9a066) 16%, transparent); border-radius: 6px; }
.note-back { position: relative; display: inline-block; padding: 0 6px; text-decoration: none; color: var(--color-text-muted); white-space: nowrap; }
.note-back::after { content: ''; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
.notes-list a, .bib-list a { color: var(--color-primary); }
.bib-group { font-size: var(--text-base); font-weight: 700; margin: var(--space-4) 0 var(--space-2); }
.bib-list { list-style: none; margin: 0; padding: 0; }
.bib-list li { padding-left: 2em; text-indent: -2em; }
.quote-notes { margin: var(--space-2) 0 0; padding-left: 1.2em; }
.quote-notes li { margin-bottom: var(--space-2); line-height: 1.55; max-width: 70ch; }
cite { font-style: italic; }
.yogi-final cite { font-style: normal; }
.intro-body-static > p { margin: 0; line-height: 1.6; }
.intro-body-static .toc { margin-top: 0; }
