/* Public notes follow the source directories; this rail links documents, not headings. */
.notes-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; margin: 0 0 40px; }
.notes-overview .notes-category { display: flex; flex-direction: column; gap: 12px; padding: 25px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; min-width: 0; }
.notes-category-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.notes-category-heading h2, .prose .notes-category-heading h2 { border: 0; padding: 0; margin: 0; font-size: 1.375rem; line-height: 1.5; }
.notes-category-heading > span { color: var(--muted); font-size: 1.25rem; }
.notes-category p, .prose .notes-category p { margin: 0; color: var(--muted); font-size: .9375rem; line-height: 1.8; }
.notes-category-count { color: var(--muted); font-size: .8125rem; margin-top: auto; }
.notes-category:hover .notes-category-heading { color: var(--accent); }
.notes-category:hover .notes-category-heading > span { color: var(--accent); }
.notes-sidebar { grid-area: toc; position: sticky; top: 112px; align-self: start; max-height: calc(100vh - 144px); max-height: calc(100dvh - 144px); overflow-y: auto; scrollbar-width: thin; padding: 0 8px 12px 0; font-size: .8125rem; }
.notes-sidebar .notes-back { display: block; padding: 0 0 20px; color: var(--muted); text-decoration: none; line-height: 1.7; }
.notes-nav-title { margin: 0 0 10px; color: var(--ink); font-weight: 600; font-size: .9375rem; line-height: 1.6; }
.notes-sidebar nav ul { list-style: none; padding: 0; margin: 0; }
.notes-sidebar nav li { padding: 0; margin: 0; }
.notes-sidebar nav a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 12px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; line-height: 1.75; overflow-wrap: anywhere; }
.notes-sidebar nav a[aria-current=page] { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.notes-sidebar nav a:hover { color: var(--ink); background: var(--soft); }
.notes-sidebar .notes-all { display: block; padding: 18px 0 0; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; font-size: .75rem; line-height: 1.7; }
.notes-nav-empty { color: var(--muted); font-size: .8125rem; }
@media (max-width: 980px) {
  .notes-sidebar { display: none; }
}
@media (max-width: 640px) {
  .notes-overview { grid-template-columns: 1fr; margin-bottom: 28px; }
  .notes-overview .notes-category { padding: 22px 0; }
  .notes-category-heading h2, .prose .notes-category-heading h2 { font-size: 1.25rem; }
  .notes-category p, .prose .notes-category p { font-size: .875rem; }
}
@media print {
  .notes-sidebar { display: none; }
}

.notes-index { border-bottom: 1px solid var(--line); padding: 0 0 22px; }
.notes-index > summary { cursor: pointer; font-size: .9375rem; font-weight: 550; }
.notes-index h2 { font-size: 1.125rem; margin-top: 28px; }
