main.learn { > nav { --nav-offset: calc(var(--offset) + 2rem); counter-reset: content-theme; position: sticky; top: 0; max-height: 100dvh; margin-left: -1rem; padding-block: var(--nav-offset) var(--offset); padding-left: 0.5rem; overflow: auto; overscroll-behavior: contain; color: var(--gray); font-size: var(--font-size-xs); line-height: var(--line-height-xs); text-transform: uppercase; ol { list-style: none; margin: 0; padding: 0; } > ol > li { counter-reset: content-topic; } > ol > li:not([data-numbered="false"]) { counter-increment: content-theme; } > ol > li > ol > li { counter-increment: content-topic; counter-reset: content-detail; } > ol > li > ol > li > ol > li { counter-increment: content-detail; } ol ol { margin-top: 0.25rem; margin-left: 1rem; } li + li { margin-top: 0.25rem; } a { display: block; scroll-margin-block: var(--offset); color: inherit; text-decoration: none; margin-right: 1rem; margin-block: -0.25rem; margin-left: -0.5rem; padding: 0.25rem; padding-left: 0.5rem; &::before { opacity: 0.5; } &:is(:hover, :active) { border-radius: 0.25rem; } &[aria-current="location"] { color: var(--white); } &:hover { color: var(--black); background-color: var(--white); } &:active { color: var(--black); background-color: var(--orange); } } > ol > li > a::before { content: counter(content-theme, upper-roman) ". "; } > ol > li[data-numbered="false"] > a::before { content: "I. "; visibility: hidden; } > ol > li > ol > li > a::before { content: counter(content-topic) ". "; } > ol > li > ol > li > ol > li > a::before { content: counter(content-detail, lower-alpha) ". "; } } }