/* cm-dict.css — complete stylesheet for CM Dictionary
   Replaces cm.css entirely. No conflicts, no !important needed.
   Body content classes (.dictsyntax, .entry, .special etc.) preserved. */

/* ══ Font faces (from cm.css) ════════════════════════════════ */

@font-face {
  font-family: GentiumPlusW; size-adjust: 110%;
  src: url(../fonts/GentiumPlus-Regular.woff2);
}
@font-face {
  font-family: GentiumPlusW; size-adjust: 110%; font-style: italic;
  src: url(../fonts/GentiumPlus-Italic.woff2);
}
@font-face {
  font-family: GentiumPlusW; size-adjust: 110%; font-weight: bold;
  src: url(../fonts/GentiumPlus-Bold.woff2);
}
@font-face {
  font-family: GentiumPlusW; font-weight: bold; size-adjust: 110%; font-style: italic;
  src: url(../fonts/GentiumPlus-BoldItalic.woff2);
}
@font-face {
  font-family: DejaVuMono; size-adjust: 90%;
  src: url(../fonts/DejaVuSansMono.woff);
}
@font-face {
  font-family: DejaVuMono; font-weight: bold; size-adjust: 90%;
  src: url(../fonts/DejaVuSansMono-Bold.woff);
}
@font-face {
  font-family: DejaVuMono; size-adjust: 90%; font-style: italic;
  src: url(../fonts/DejaVuSansMono-Oblique.woff);
}
@font-face {
  font-family: DejaVuMono; size-adjust: 90%; font-weight: bold; font-style: italic;
  src: url(../fonts/DejaVuSansMono-BoldOblique.woff);
}
@font-face {
  font-family: AndikaW; size-adjust: 100%;
  src: url(../fonts/Andika-Regular.woff2);
}
@font-face {
  font-family: AndikaW; size-adjust: 100%; font-style: italic;
  src: url(../fonts/Andika-Italic.woff2);
}
@font-face {
  font-family: AndikaW; size-adjust: 100%; font-weight: bold;
  src: url(../fonts/Andika-Bold.woff2);
}
@font-face {
  font-family: AndikaW; size-adjust: 100%; font-weight: bold; font-style: italic;
  src: url(../fonts/Andika-BoldItalic.woff2);
}
@font-face {
  font-family: FontAwesome; size-adjust: 100%;
  src: url(../fonts/fontawesome-webfont.woff2);
}

/* ══ Theme variables (from cm.css) ═══════════════════════════ */

[data-theme="dark"] {
    --global-font-size: 10pt;
    --clamps-dict-toc-width: 17.8em;
    --clamps-toc-width: 17.8em;
    --overview-toc-width: 17.8em;
    --text-font: DejaVu, Arial, sans;
    --header-font: DejaVu, Arial, sans-serif;
    --monospace-font: monospace;
    --text-background: #1e2129;
    --text-color: #b5b9bf;
    --toc-background: #1e2129;
    --menu-background: #1e2129;
    --anchor-hover: #7ab6ff;
    --anchor-toc: #518be2;
    --anchor-active: #ffa500;
    --i-color: #518be2;
    --arg-color: #d06060;
    --h1-color: #7a7d87; --h2-color: #7a7d87; --h3-color: #7a7d87;
    --h4-color: #7a7d87; --h5-color: #7a7d87;
    --nav-color: #284671; --nav-hover: #518be2;
    --code-background: #121010;
    --code-border: #303030;
    --code-text:  white;
    --code-comment-color: #add8e6;
    --code-keyword-color: #7fffd4;
    --code-string-color: #7ab6ff;
    --code-special-color: white;
    --code-defined-color: white;
    --code-variable-color: #40e0d0;
    --rainbow-del-depth-1: #ffff00;
    --rainbow-del-depth-2: #a9a9a9;
    --rainbow-del-depth-3: #ff1493;
    --rainbow-del-depth-4: #adff2f;
    --rainbow-del-depth-5: #00bfff;
    --rainbow-del-depth-6: #ffff00;
    --rainbow-del-depth-7: #cdad00;
    --rainbow-del-depth-8: #cd8500;
    --rainbow-del-depth-9: #8b4500;
    --rainbow-del-mismatched: #88090B;
    --rainbow-del-unmatched: #88090B;
}

[data-theme="light"] {
    --global-font-size: 10pt;
    --clamps-dict-toc-width: 17.8em;
    --clamps-toc-width: 17.8em;
    --overview-toc-width: 17.8em;
    --text-font: DejaVu, Arial, sans;
    --header-font: DejaVu, Arial, sans-serif;
    --monospace-font: monospace;
    --text-background: #ffffff;
    --text-color: #000000;
    --toc-background: #ffffff;
    --menu-background: #fff;
    --anchor-hover: #7ab6ff;
    --anchor-toc: #3e6bae;
    --anchor-active: #ef9500;
    --i-color: #3e6bae;
    --arg-color: #b04040;
    --h1-color: #5a5d67; --h2-color: #5a5d67; --h3-color: #5a5d67;
    --h4-color: #5a5d67; --h5-color: #5a5d67;
    --nav-color: #284671; --nav-hover: #7ab6ff;
    --code-background: #eee;
    --code-border: #303030;
    --code-text: #000;
    --code-comment-color: #5a96cf;
    --code-keyword-color: #060;
    --code-string-color: #7ab6ff;
    --code-special-color: #000;
    --code-defined-color: #000;
    --code-variable-color: #67b600;
    --rainbow-del-depth-1: #aa7700;
    --rainbow-del-depth-2: #999999;
    --rainbow-del-depth-3: #ff1493;
    --rainbow-del-depth-4: #8daa2f;
    --rainbow-del-depth-5: #00bfff;
    --rainbow-del-depth-6: #ffff00;
    --rainbow-del-depth-7: #cdad00;
    --rainbow-del-depth-8: #cd8500;
    --rainbow-del-depth-9: #8b4500;
    --rainbow-del-mismatched: #88090B;
    --rainbow-del-unmatched: #88090B;
}

/* ══ Base ═════════════════════════════════════════════════════ */


:root {
    background: var(--text-background);
    color: var(--text-color);
    line-height: 1.6em;
    margin: 0;
    font-family: var(--text-font);
    font-size: clamp(10px, 1vw, 24px);
}

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    /* Prevent white flash during navigation — overridden by data-theme */
    background: #1e2129;
}

[data-theme="dark"] html, [data-theme="dark"] body { background: #1e2129; }
[data-theme="light"] html, [data-theme="light"] body { background: #ffffff !important; }

/* ══ Page layout ══════════════════════════════════════════════ */

body {
    display: grid;
    grid-template-rows: 2em 3em 1fr;
    grid-template-areas:
        "top-buttons"
        "top-menu"
        "body-content";
    min-height: 0;
}

/* ══ Top buttons ══════════════════════════════════════════════ */

#top-buttons {
    grid-area: top-buttons;
    background: var(--menu-background);
    display: flex;
    align-items: center;
    gap: 0.4em;
    padding: 0 0.5em 0 1rem;
}

#toc-button,
#theme-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--h2-color);
    width: 17px;
    height: 17px;
    font-family: inherit;
    font-size: inherit;
    position: static;
    margin: 0;
    border-radius: 0;
}

#toc-button::before, #toc-button::after,
#theme-button::before, #theme-button::after {
    content: none;
    display: none;
}

#toc-button svg, #theme-button svg {
    width: 17px;
    height: 17px;
    display: block;
}

/* ══ Top menu ═════════════════════════════════════════════════ */

#preamble {
    grid-area: top-menu;
    background: var(--menu-background);
    display: flex;
}

.top-menu {
    padding: 0.5em 1em 0.5em 1rem;
    align-self: flex-end;
    font-size: 1.2em;
    color: var(--anchor-toc);
    text-decoration: none;
}

.top-menu:first-child { padding-left: 1rem; }
.top-menu-active,
a.top-menu-active,
a.top-menu-active:visited { color: var(--anchor-active); }
.top-menu:hover { color: var(--anchor-hover); }

/* ══ Content grid ═════════════════════════════════════════════ */

#cm-outer-content {
    grid-area: body-content;
    min-height: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: var(--toc-col-width, auto) 1fr;
    grid-template-areas: "nav content";
}

/* ══ TOC sidebar ══════════════════════════════════════════════ */

#table-of-contents {
    grid-area: nav;
    width: var(--clamps-dict-toc-width);
    background: var(--toc-background);
    min-height: 0;
    overflow: auto;
    padding: 0;
}

nav#table-of-contents h2 {
    display: inline-block;
    margin: 0;
    padding: 0 0 0 1rem;
    font-size: 1.2rem;
    font-weight: normal;
    color: var(--h2-color);
    font-family: var(--text-font);
}

.toc-open  { width: var(--clamps-dict-toc-width); }
.toc-closed { display: none; }

#text-table-of-contents {
    line-height: 1.3em;
    overflow: hidden;
    white-space: nowrap;
}

#table-of-contents ul,
#table-of-contents .ul-toc-level-1,
#table-of-contents .ul-toc-level-2 {
    padding-left: 1rem;
    margin: 0;
    list-style: none;
}

.toc-level-1 {
    margin-top: 0.5em;
    font-size: 1.6em;
    font-weight: bold;
    line-height: 1.6em;
    color: var(--h2-color);
    pointer-events: none;
}

.toc-letter { color: var(--h2-color); }

.toc-level-2 {
    font-size: 0.625em;
    font-weight: normal;
    line-height: 1.2em;
    list-style: none;
    pointer-events: auto;
}

.toc-entry {
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    white-space: nowrap;
    max-width: 100%;
    color: var(--anchor-toc);
    text-decoration: none;
    pointer-events: auto;
}

.toc-entry:hover { color: var(--anchor-hover); }

.toc-active,
a.toc-active,
a.toc-active:link,
a.toc-active:visited,
a.toc-active:hover    { color: var(--anchor-active); }
.toc-hidden      { display: list-item; }

/* ══ Main content area ════════════════════════════════════════ */

#page-main-body {
    grid-area: content;
    min-height: 0;
    display: flex;
    overflow: auto;
    padding: 0;
}

#page-text-body {
    display: block;
    flex: 1;
    min-width: 0;
    padding: 0;
    overflow: unset;
    box-sizing: border-box;
}

.cm-content {
    padding: 0;
    min-width: 0;
}

/* ══ Body content rules (from cm.css, untouched) ═════════════ */

a             { text-decoration: none; }
a:link        { color: var(--anchor-toc); }
a:visited     { color: var(--anchor-toc); }
a:hover       { color: var(--anchor-hover); text-decoration: none; }
a:active      { color: var(--anchor-active); }

h1 { display: none; }
h2 { font-size: 2em; /* display: none; */ }
h3 { font-size: 1.8em; }
h4 { font-size: 1.5em; }
h5 { font-size: 1.3em; }

h2, h3, h4, h5 {
    font-family: var(--header-font);
    color: var(--h2-color);
    font-weight: normal;
    line-height: 1.3em;
}

kbd {
    font-family: var(--monospace-font, monospace);
    font-size: 1em;
}

/* Override themes.css code color; inside links always inherit anchor color */
code {
    color: var(--arg-color);
}

a code, a kbd,
a:link code, a:link kbd,
a:visited code, a:visited kbd {
    color: var(--anchor-toc) !important;
}

a.toc-active code, a.toc-active kbd,
a.toc-active:link code, a.toc-active:link kbd,
a.toc-active:visited code, a.toc-active:visited kbd {
    color: var(--anchor-active) !important;
}

acronym, abbr { font-variant: small-caps; border-bottom: 1px dotted #333; cursor: help; }
acronym { text-transform: lowercase; font-variant: small-caps; }
acronym.nohelp, abbr.nohelp { border-bottom: none; cursor: default; }
del { color: #644; }
ins { color: #464; text-decoration: none; }

.inv { display: none; }

var { font-family: sans-serif; font-style: oblique; }
span.chapter-nr { display: block; }

div.float, dl.implnote, dl.lisprule { margin: 2em 4em; }
dl.lisprule { font-weight: bold; }

blockquote.quotation { margin-left: 44.45%; margin-right: 0; padding-right: 0; }
p.quotetext  { margin-left: 0; text-indent: 0; text-align: justify; font-style: italic; }
p.quoteinfo  { margin-left: 0; margin-top: .5em; text-indent: 0; font-style: normal; text-align: right; }
p.tablenote  { margin-top: .5em; text-indent: 0; font-style: normal; font-size: 80%; text-align: left; }
div.float p  { margin-bottom: .5em; }

p.captxt     { display: table; margin: 1em auto; font-style: italic; font-weight: normal; text-align: justify; }
span.floatlabel { font-weight: bold; color: #222; }

pre.code  { margin: 0 1.2em 1em 1.2em; padding: 8pt; border: 1px solid var(--code-border); background: var(--code-background); color: var(--code-text); overflow: auto; }
pre.shell { margin: 0 1.2em 1em 1.2em; padding: 8pt; border: 1px solid var(--code-border); background: var(--code-background); color: var(--code-text); overflow: auto; }
p.wrapshell { margin: 0 1.2em; font-style: normal; font-family: monospace; padding: .5em; border: 1px solid var(--code-border); background: var(--code-background); }

ul.dictindex    { margin: 0; padding: .25em; }
ul.dictindex li { list-style: none; }
span.syntax     { font-style: normal; }
code.keyword    { color: var(--code-keyword-color); }
code.entry      { font-style: normal; /* font-weight: bold; */ }
span.entry      { font-weight: bold; }

ul.media    { margin: 0; padding: .25em 0; }
ul.media li { list-style: none; }

dt.lispnote     { color: #4b4; }
dt.platformnote { color: #b44; }

table.float              { border-top: 1px solid gray; border-bottom: 1px solid gray; }
tbody.transitions tr td  { text-align: center; }
th.col   { border-bottom: 1px solid silver; text-align: center; }
th.lcol  { border-bottom: 1px solid silver; text-align: left; }
th.rcol  { border-bottom: 1px solid silver; text-align: right; }
th.row   { text-align: left; padding-right: .5em; }
th.rrow  { text-align: right; padding-left: .5em; }
td.rcell { text-align: right; }
td.lcell { text-align: left; }
img      { border: none; }

/* Syntax highlighting — context-sensitive */
span.emacscmd { font-weight: bold; font-size: smaller; }
span.emacskey { text-decoration: underline; }
span.string   { color: var(--code-string-color); }
span.comment  { font-style: italic; color: var(--code-comment-color); }
/* Keywords in body text: --arg-color, not bold */
span.keyword  { color: var(--arg-color); font-weight: normal; }
/* Keywords inside code blocks: aquamarine from htmlize.css, not bold */
pre span.keyword, .cm-entry-syntax span.keyword { color: var(--code-keyword-color); font-weight: normal; }
code.keyword  { color: var(--arg-color); font-weight: normal; }
/* code tag: green like --i-color in clamps-dict */
code          { color: var(--code-text); }
/* but not inside links or entry syntax */
a code, a kbd,
a:link code, a:link kbd,
a:visited code, a:visited kbd { color: var(--anchor-toc) !important; }
a.toc-active code, a.toc-active:link code,
a.toc-active:visited code { color: var(--anchor-active) !important; }
span.special  { color: var(--code-special-color); }
span.defined  { color: var(--code-defined-color); }
span.result   { font-weight: bold; color: silver; }
span.input    { font-weight: normal; }

span.salstr { color: #bc8f8f; }
span.salout { color: #bc8f8f; }
span.salcom { color: #b22222; }
span.salkey { color: #da70d6; }
span.salres { color: #a020f0; }
span.saltyp { color: #228b22; }
span.salcmd { color: #0000ff; }
span.salcon { color: #5f9ea0; }

div.printout { margin: 0; color: #3f7f7f; font-size: smaller; background: #f7f7f7; }

span.author    { font-style: normal; }
span.book, span.journal { font-style: italic; }
span.article   { font-style: normal; }
span.publisher { font-style: normal; }

/* ══ Entry header structure ═══════════════════════════════════ */

.cm-entry-name {
    font-size: 1.8em;
    font-family: var(--header-font);
    color: var(--h2-color);
    font-weight: normal;
    line-height: 1.3em;
}

.cm-entry-type {
    color: var(--text-color);
    margin: 0 0 0.6em 0;
}

.cm-entry-syntax {
    margin: 0 0 1em 0;
}

.cm-entry-syntax pre {
    margin: 0 1.2em;
    padding: 8pt;
    border: 1px solid var(--code-border);
    background: var(--code-background);
    color: var(--code-text);
    font-family: var(--monospace-font, monospace);
}

/* Entry name in syntax block: white, not bold */
.cm-entry-syntax code.entry,
.cm-entry-syntax span.entry {
    color: var(--code-text);
    font-weight: normal;
    font-style: normal;
}

/* Hide the original dl.dictsyntax — replaced by new structure */
dl.dictsyntax { display: none; }

#footer { padding: 0.3em 1em; font-size: 0.65em; color: var(--text-color); opacity: 0.5; text-align: left; }
#footer div { display: inline; margin-right: 1em; }

/* ══ Navigation arrows ════════════════════════════════════════ */

#nav-left, #nav-right {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 100vh;
    width: 64px;
    position: sticky;
    top: 0;
    flex-shrink: 0;
    min-width: 64px;
    color: var(--nav-color);
}

a.nav-left, a.nav-right {
    display: flex;
    width: 100%;
        justify-content: center;
    align-items: center;
    color: var(--nav-color);
}

a.nav-left:hover, a.nav-right:hover {
    color: var(--nav-hover);
}

i.angle-left::before { content: none; }
i.angle-right::before { content: none; }

i.angle-left, i.angle-right {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--nav-color);
}

i.angle-left svg, i.angle-right svg {
    width: 100%;
    height: 100%;
}

i.angle-left-inactive,
i.angle-right-inactive { display: none; }

/* Mobile layout — applied immediately via JS before first paint */
html.mobile-layout #page-main-body {
    flex-wrap: wrap;
}
html.mobile-layout #page-text-body {
    order: 1;
    flex: none;
    width: 100%;
    padding: 0 8px;
}
html.mobile-layout #nav-left {
    order: 2;
    flex: 1;
    height: auto;
    width: auto;
    min-width: 0;
    position: static;
    flex-direction: row;
    justify-content: flex-start;
    padding: 0.5em 1em;
}
html.mobile-layout #nav-right {
    order: 3;
    flex: 1;
    height: auto;
    width: auto;
    min-width: 0;
    position: static;
    flex-direction: row;
    justify-content: flex-end;
    padding: 0.5em 1em;
}
html.mobile-layout a.nav-left,
html.mobile-layout a.nav-right {
    width: auto;
    height: auto;
}

html.mobile-layout {
    font-size: clamp(20px, 2vw, 48px) !important;
}

/* Mobile font size — targets phones regardless of JS detection */
@media screen and (max-device-width: 1024px) and (pointer: coarse) {
    :root {
        font-size: clamp(20px, 2vw, 48px) !important;
    }
}

/* Mobile scrolling layout */
html.mobile-layout,
html.mobile-layout body {
    position: relative;
    overflow: auto !important;
    height: auto !important;
    min-height: 100% !important;
}

html.mobile-layout body {
    position: relative;
    display: block !important;
    min-height: 100vh !important;
}

html.mobile-layout #content,
html.mobile-layout #cm-outer-content {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
}

html.mobile-layout #table-of-contents {
    display: none !important;
}

html.mobile-layout #page-main-body {
    display: flex !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
}

html.mobile-layout #page-text-body {
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
}

/* Mobile menu button — hidden on desktop, shown on mobile in top-buttons */
#menu-button {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--h2-color);
    width: 1.8em;
    height: 1.8em;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
}
#menu-button svg { width: 100%; height: 100%; }

html.mobile-layout #menu-button { display: flex !important; }
@media (pointer: coarse) { #menu-button { display: flex !important; } }
@media (pointer: coarse) { #preamble > a.top-menu { display: none !important; } }
html.mobile-layout #preamble > a.top-menu { display: none !important; }

/* Popup — fixed position top right */
#mobile-menu-popup {
    display: none !important;
    position: fixed;
    top: 5em;
    right: 0;
    z-index: 9999;
    background: var(--menu-background);
    border: 1px solid var(--h2-color);
    padding: 0.5em 0;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    flex-direction: column;
}
#mobile-menu-popup.open { display: flex !important; }
#mobile-menu-popup a {
    display: block !important;
    padding: 0.8em 1.5em !important;
    font-size: 1.4em !important;
    color: var(--anchor-toc) !important;
    text-decoration: none !important;
    border-bottom: 1px solid var(--h2-color);
    white-space: nowrap;
}
#mobile-menu-popup a:last-child { border-bottom: none; }
#mobile-menu-popup a.top-menu-active { color: var(--anchor-active) !important; }

/* Mobile TOC: show as overlay when toggled */
html.mobile-layout #table-of-contents {
    display: none !important;
    position: fixed !important;
    top: 5em !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 80vw !important;
    max-width: 320px !important;
    z-index: 9998 !important;
    overflow-y: auto !important;
    box-shadow: 4px 0 12px rgba(0,0,0,0.5) !important;
}
html.mobile-layout #table-of-contents.toc-open {
    display: block !important;
}
html.mobile-layout .toc-closed {
    display: none !important;
}
/* Overlay backdrop */
#mobile-toc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9997;
    background: rgba(0,0,0,0.4);
}
#mobile-toc-overlay.open { display: block; }

@media (pointer: coarse) {
    #page-text-body { padding: 0 8px !important; }
}

/* TOC overlay for coarse pointer devices (fallback for mobile-layout class) */
@media (pointer: coarse) {
    #table-of-contents {
        display: none !important;
        position: fixed !important;
        top: 5em !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 80vw !important;
        max-width: 320px !important;
        z-index: 9998 !important;
        overflow-y: auto !important;
        box-shadow: 4px 0 12px rgba(0,0,0,0.5) !important;
    }
    #table-of-contents.toc-open {
        display: block !important;
    }
}

[data-theme="light"] html.mobile-layout body,
[data-theme="light"] html.mobile-layout { background: #ffffff !important; }
[data-theme="dark"] html.mobile-layout body,
[data-theme="dark"] html.mobile-layout { background: #1e2129 !important; }

@media (pointer: coarse) {
    #toc-button, #theme-button { width: 1.2em !important; height: 1.2em !important; }
    #toc-button svg, #theme-button svg { width: 1.2em !important; height: 1.2em !important; }
}

/* Body ul: align with headers, disc bullets */
#page-text-body ul {
    padding-left: 1em;
    margin-left: 0;
    list-style-type: disc;
}

/* See Also links: body font, not monospace */
h4 + ul a,
h4 + ul li {
    font-family: var(--text-font);
    font-size: 1em;
}
h4 + ul a code,
h4 + ul a kbd {
    font-family: var(--text-font) !important;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--h2-color);
}
#table-of-contents:hover::-webkit-scrollbar-thumb,
#page-main-body:hover::-webkit-scrollbar-thumb,
#page-text-body:hover::-webkit-scrollbar-thumb {
    background: var(--h2-color);
}

/* Thin scrollbar — hidden until hover (Chromium) */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 2px;
    transition: background 0.2s;
}
#table-of-contents:hover::-webkit-scrollbar-thumb,
#page-main-body:hover::-webkit-scrollbar-thumb {
    background: var(--h2-color);
}

/* Firefox — thin scrollbar, hidden until hover */
#table-of-contents {
    scrollbar-width: none;
}
#table-of-contents:hover {
    scrollbar-width: thin;
    scrollbar-color: var(--h2-color) transparent;
}
#page-main-body {
    scrollbar-width: none;
}
#page-main-body:hover {
    scrollbar-width: thin;
    scrollbar-color: var(--h2-color) transparent;
}
