diff --git a/assets/style.css b/assets/style.css index 1dcb653..c1ab60f 100644 --- a/assets/style.css +++ b/assets/style.css @@ -42,11 +42,6 @@ --font-xs: 0.75rem; --font-sm: 0.85rem; - /* Height of the sticky top header. Single source of truth for the - sidebar/TOC top offsets and anchor scroll-padding. Hardcoded (the - desktop header is a single-row grid); revisit if the header wraps. */ - --header-h: 3.25rem; - /* Width of the persistent left folder-tree rail (desktop). */ --tree-width: 15rem; @@ -586,20 +581,10 @@ aside.sidebar:empty { display: none; } border: none; } -/* === Table of contents (floating variant) === - Default rendering is a fixed floating panel; inside .sidebar it becomes - static via the .panel-sidebar density class. */ -.toc { - position: fixed; - top: calc(var(--header-h) + var(--space-2)); - right: var(--space-4); - width: 14rem; - max-height: calc(100vh - 6rem); - overflow-y: auto; - padding: var(--space-2) var(--space-3); - font-size: var(--font-sm); -} -.sidebar .toc { position: static; width: auto; max-height: none; } +/* === Table of contents === + Rendered as a .panel-sidebar block in the right rail (padding + font-size + come from that density class); toc.js always mounts it there, on both + desktop and inside the mobile Overlay. */ .toc ul { list-style: none; margin: 0; padding: 0; } .toc li { margin: 0.15rem 0; } .toc a {