@import url("https://fonts.googleapis.com/css2?family=Familjen+Grotesk:wght@500;700&family=Literata:ital,opsz,wght@0,7..72,400;0,7..72,600;1,7..72,400&family=JetBrains+Mono:wght@400;600&display=swap");
/* CSS for UI elements (a.k.a. chrome) */

@import 'variables.css';

::-webkit-scrollbar {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar);
}
html {
    scrollbar-color: var(--scrollbar) var(--bg);
}
#searchresults a,
.content a:link,
a:visited,
a > .hljs {
    color: var(--links);
}

/* Menu Bar */

#menu-bar,
#menu-bar-hover-placeholder {
    z-index: 101;
    margin: auto calc(0px - var(--page-padding));
}
#menu-bar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    background-color: var(--bg);
    border-bottom-color: var(--bg);
    border-bottom-width: 1px;
    border-bottom-style: solid;
}
#menu-bar.sticky,
.js #menu-bar-hover-placeholder:hover + #menu-bar,
.js #menu-bar:hover,
.js.sidebar-visible #menu-bar {
    position: -webkit-sticky;
    position: sticky;
    top: 0 !important;
}
#menu-bar-hover-placeholder {
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    height: var(--menu-bar-height);
}
#menu-bar.bordered {
    border-bottom-color: var(--table-border-color);
}
#menu-bar i, #menu-bar .icon-button {
    position: relative;
    padding: 0 8px;
    z-index: 10;
    line-height: var(--menu-bar-height);
    cursor: pointer;
    transition: color 0.5s;
}
@media only screen and (max-width: 420px) {
    #menu-bar i, #menu-bar .icon-button {
        padding: 0 5px;
    }
}

.icon-button {
    border: none;
    background: none;
    padding: 0;
    color: inherit;
}
.icon-button i {
    margin: 0;
}

.right-buttons {
    margin: 0 15px;
}
.right-buttons a {
    text-decoration: none;
}

.left-buttons {
    display: flex;
    margin: 0 5px;
}
.no-js .left-buttons {
    display: none;
}

.menu-title {
    display: inline-block;
    font-weight: 200;
    font-size: 2.4rem;
    line-height: var(--menu-bar-height);
    text-align: center;
    margin: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.js .menu-title {
    cursor: pointer;
}

.menu-bar,
.menu-bar:visited,
.nav-chapters,
.nav-chapters:visited,
.mobile-nav-chapters,
.mobile-nav-chapters:visited,
.menu-bar .icon-button,
.menu-bar a i {
    color: var(--icons);
}

.menu-bar i:hover,
.menu-bar .icon-button:hover,
.nav-chapters:hover,
.mobile-nav-chapters i:hover {
    color: var(--icons-hover);
}

/* Nav Icons */

.nav-chapters {
    font-size: 2.5em;
    text-align: center;
    text-decoration: none;

    position: fixed;
    top: 0;
    bottom: 0;
    margin: 0;
    max-width: 150px;
    min-width: 90px;

    display: flex;
    justify-content: center;
    align-content: center;
    flex-direction: column;

    transition: color 0.5s, background-color 0.5s;
}

.nav-chapters:hover {
    text-decoration: none;
    background-color: var(--theme-hover);
    transition: background-color 0.15s, color 0.15s;
}

.nav-wrapper {
    margin-top: 50px;
    display: none;
}

.mobile-nav-chapters {
    font-size: 2.5em;
    text-align: center;
    text-decoration: none;
    width: 90px;
    border-radius: 5px;
    background-color: var(--sidebar-bg);
}

.previous {
    float: left;
}

.next {
    float: right;
    right: var(--page-padding);
}

@media only screen and (max-width: 1080px) {
    .nav-wide-wrapper { display: none; }
    .nav-wrapper { display: block; }
}

@media only screen and (max-width: 1380px) {
    .sidebar-visible .nav-wide-wrapper { display: none; }
    .sidebar-visible .nav-wrapper { display: block; }
}

/* Inline code */

:not(pre) > .hljs {
    display: inline;
    padding: 0.1em 0.3em;
    border-radius: 3px;
}

:not(pre):not(a) > .hljs {
    color: var(--inline-code-color);
    overflow-x: initial;
}

a:hover > .hljs {
    text-decoration: underline;
}

pre {
    position: relative;
}
pre > .buttons {
    position: absolute;
    z-index: 100;
    right: 5px;
    top: 5px;

    color: var(--sidebar-fg);
    cursor: pointer;
}
pre > .buttons :hover {
    color: var(--sidebar-active);
}
pre > .buttons i {
    margin-left: 8px;
}
pre > .buttons button {
    color: inherit;
    background: transparent;
    border: none;
    cursor: inherit;
}
pre > .result {
    margin-top: 10px;
}

/* Search */

#searchresults a {
    text-decoration: none;
}

mark {
    border-radius: 2px;
    padding: 0 3px 1px 3px;
    margin: 0 -3px -1px -3px;
    background-color: var(--search-mark-bg);
    transition: background-color 300ms linear;
    cursor: pointer;
}

mark.fade-out {
    background-color: rgba(0,0,0,0) !important;
    cursor: auto;
}

.searchbar-outer {
    margin-left: auto;
    margin-right: auto;
    max-width: var(--content-max-width);
}

#searchbar {
    width: 100%;
    margin: 5px auto 0px auto;
    padding: 10px 16px;
    transition: box-shadow 300ms ease-in-out;
    border: 1px solid var(--searchbar-border-color);
    border-radius: 3px;
    background-color: var(--searchbar-bg);
    color: var(--searchbar-fg);
}
#searchbar:focus,
#searchbar.active {
    box-shadow: 0 0 3px var(--searchbar-shadow-color);
}

.searchresults-header {
    font-weight: bold;
    font-size: 1em;
    padding: 18px 0 0 5px;
    color: var(--searchresults-header-fg);
}

.searchresults-outer {
    margin-left: auto;
    margin-right: auto;
    max-width: var(--content-max-width);
    border-bottom: 1px dashed var(--searchresults-border-color);
}

ul#searchresults {
    list-style: none;
    padding-left: 20px;
}
ul#searchresults li {
    margin: 10px 0px;
    padding: 2px;
    border-radius: 2px;
}
ul#searchresults li.focus {
    background-color: var(--searchresults-li-bg);
}
ul#searchresults span.teaser {
    display: block;
    clear: both;
    margin: 5px 0 0 20px;
    font-size: 0.8em;
}
ul#searchresults span.teaser em {
    font-weight: bold;
    font-style: normal;
}

/* Sidebar */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    font-size: 0.875em;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-fg);
}
.sidebar-resizing {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.js:not(.sidebar-resizing) .sidebar {
    transition: transform 0.3s; /* Animation: slide away */
}
.sidebar code {
    line-height: 2em;
}
.sidebar .sidebar-scrollbox {
    overflow-y: auto;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 10px;
}
.sidebar .sidebar-resize-handle {
    position: absolute;
    cursor: col-resize;
    width: 0;
    right: 0;
    top: 0;
    bottom: 0;
}
.js .sidebar .sidebar-resize-handle {
    cursor: col-resize;
    width: 5px;
}
.sidebar-hidden .sidebar {
    transform: translateX(calc(0px - var(--sidebar-width)));
}
.sidebar::-webkit-scrollbar {
    background: var(--sidebar-bg);
}
.sidebar::-webkit-scrollbar-thumb {
    background: var(--scrollbar);
}

.sidebar-visible .page-wrapper {
    transform: translateX(var(--sidebar-width));
}
@media only screen and (min-width: 620px) {
    .sidebar-visible .page-wrapper {
        transform: none;
        margin-left: var(--sidebar-width);
    }
}

.chapter {
    list-style: none outside none;
    padding-left: 0;
    line-height: 2.2em;
}

.chapter ol {
    width: 100%;
}

.chapter li {
    display: flex;
    color: var(--sidebar-non-existant);
}
.chapter li a {
    display: block;
    padding: 0;
    text-decoration: none;
    color: var(--sidebar-fg);
}

.chapter li a:hover {
    color: var(--sidebar-active);
}

.chapter li a.active {
    color: var(--sidebar-active);
}

.chapter li > a.toggle {
    cursor: pointer;
    display: block;
    margin-left: auto;
    padding: 0 10px;
    user-select: none;
    opacity: 0.68;
}

.chapter li > a.toggle div {
    transition: transform 0.5s;
}

/* collapse the section */
.chapter li:not(.expanded) + li > ol {
    display: none;
}

.chapter li.chapter-item {
    line-height: 1.5em;
    margin-top: 0.6em;
}

.chapter li.expanded > a.toggle div {
    transform: rotate(90deg);
}

.spacer {
    width: 100%;
    height: 3px;
    margin: 5px 0px;
}
.chapter .spacer {
    background-color: var(--sidebar-spacer);
}

@media (-moz-touch-enabled: 1), (pointer: coarse) {
    .chapter li a { padding: 5px 0; }
    .spacer { margin: 10px 0; }
}

.section {
    list-style: none outside none;
    padding-left: 20px;
    line-height: 1.9em;
}

/* Theme Menu Popup */

.theme-popup {
    position: absolute;
    left: 10px;
    top: var(--menu-bar-height);
    z-index: 1000;
    border-radius: 4px;
    font-size: 0.7em;
    color: var(--fg);
    background: var(--theme-popup-bg);
    border: 1px solid var(--theme-popup-border);
    margin: 0;
    padding: 0;
    list-style: none;
    display: none;
}
.theme-popup .default {
    color: var(--icons);
}
.theme-popup .theme {
    width: 100%;
    border: 0;
    margin: 0;
    padding: 2px 10px;
    line-height: 25px;
    white-space: nowrap;
    text-align: left;
    cursor: pointer;
    color: inherit;
    background: inherit;
    font-size: inherit;
}
.theme-popup .theme:hover {
    background-color: var(--theme-hover);
}
.theme-popup .theme:hover:first-child,
.theme-popup .theme:hover:last-child {
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

/* The Nanuq book's look: nimibook's layout with the palette, fonts and code cells of
   the Nanuq dev log. `nimble genbook` adds it to the end of nimibook's
   assets/css/chrome.css, so it applies to every page, Markdown ones included. */
/* html.<theme> beats nimibook's .<theme> in variables.css */
html.light, html.rust {
  --ice: #f3f7f9; --floe: #ffffff; --ink: #12222e; --mute: #5a6b77; --rule: #d5e1e8;
  --fjord: #0d6f86; --out-bg: #e8f0f4;
  --kw: #8a3b8f; --str: #2f7a3a; --num: #a55310; --com: #7b8a95; --fn: #0d6f86;
  --sidebar-bg: #e8f0f4; --sidebar-fg: #12222e; --sidebar-active: #0d6f86;
  --sidebar-non-existant: #93a6b3; --sidebar-spacer: #d5e1e8;
  --theme-popup-bg: #ffffff; --theme-popup-border: #d5e1e8; --theme-hover: #e8f0f4;
  --searchbar-bg: #ffffff; --searchbar-border-color: #d5e1e8; --searchresults-li-bg: #e8f0f4;
  --search-mark-bg: #b9e3ec; --icons: #5a6b77; --icons-hover: #0d6f86; --scrollbar: #93a6b3;
  color-scheme: light;
}
html.coal, html.navy, html.ayu {
  --ice: #0d161d; --floe: #121e27; --ink: #e3ecf1; --mute: #93a6b3; --rule: #22323e;
  --fjord: #5cc4dc; --out-bg: #0a1218;
  --kw: #d79be0; --str: #8fd19a; --num: #f0a868; --com: #6d8190; --fn: #5cc4dc;
  --sidebar-bg: #0a1218; --sidebar-fg: #c9d6de; --sidebar-active: #5cc4dc;
  --sidebar-non-existant: #5a6b77; --sidebar-spacer: #22323e;
  --theme-popup-bg: #121e27; --theme-popup-border: #22323e; --theme-hover: #1a2a35;
  --searchbar-bg: #121e27; --searchbar-fg: #e3ecf1; --searchbar-border-color: #22323e;
  --searchresults-li-bg: #121e27; --search-mark-bg: #1d5566; --icons: #93a6b3;
  --icons-hover: #5cc4dc; --scrollbar: #5a6b77;
  color-scheme: dark;
}
html.light, html.rust, html.coal, html.navy, html.ayu {
  --bg: var(--ice); --fg: var(--ink); --links: var(--fjord); --inline-code-color: var(--ink);
  --quote-bg: var(--floe); --quote-border: var(--fjord);
  --table-border-color: var(--rule); --table-header-bg: var(--out-bg); --table-alternate-bg: var(--floe);
  --display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Literata", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --content-max-width: 78rem;  /* rem is 10px in nimibook */
}
html { font-family: var(--body); }
body { font-size: 1.7rem; line-height: 1.65; }  /* nimibook sets html to 62.5% */
.sidebar { font-family: var(--display); font-size: 1.5rem; border-right: 1px solid var(--rule); }
.chapter li a, .chapter li.chapter-item { line-height: 1.4; }
.chapter li a.active { font-weight: 700; }
.menu-bar { border-bottom-color: var(--rule) !important; }
#theme-list { display: none !important; }
.menu-title { font: 700 2rem/var(--menu-bar-height) var(--display); letter-spacing: -.01em; }
.content main { line-height: 1.65; }
.content h1, .content h2, .content h3, .content h4 { font-family: var(--display); line-height: 1.15;
  text-wrap: balance; }
.content h1 { font-size: clamp(3.2rem, 6vw, 4.4rem); letter-spacing: -.02em; margin: 1.5rem 0 1rem; }
.content h2 { font-size: 2.6rem; letter-spacing: -.01em; margin-top: 3.6rem; }
.content h3 { font-size: 2rem; margin-top: 2.6rem; }
.content p, .content li { max-width: 65ch; }
.content a, .content a:link, .content a:visited { color: var(--fjord); }
.content a { text-decoration: underline; text-underline-offset: 2px; }
.content .header:link, .content .header:visited { color: var(--ink); text-decoration: none; }
blockquote { border-left: 3px solid var(--fjord); border-top: none; border-bottom: none; margin: 1.5rem 0;
  padding: .2rem 1.4rem; background: var(--floe); color: var(--mute); border-radius: 0 6px 6px 0; }
code, pre, pre code, .hljs { font-family: var(--mono) !important; font-variant-ligatures: none; }
:not(pre) > code { font-size: .86em; background: var(--out-bg); padding: .1em .3em; border-radius: 3px; }
.content pre { position: relative; margin: 1rem 0 0; }
.content pre > code, .content pre > code.hljs {
  display: block; background: var(--floe); color: var(--ink); border: 1px solid var(--rule);
  border-radius: 6px; padding: 2.2rem 1.4rem 1.2rem; font-size: 1.36rem; line-height: 1.55; overflow-x: auto; }
.content pre::before { position: absolute; top: .6rem; right: 1rem; z-index: 1;
  font: 600 1rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.content pre:has(> code.nim)::before { content: "nim · ran"; }
.content pre:has(> code.language-python)::before { content: "python · ran"; }
.content pre:has(> code.nim-source)::before { content: "nim · source of this page"; }
.content pre:has(> code.nim-file)::before { content: "nim · source file"; }
.content pre:has(> code.py-file)::before { content: "python · source file"; }
.content p.nq-file { margin: 0 0 .4rem; font: .85em var(--mono); }
.content pre:has(> code):has(+ pre.nb-output) > code,
.content pre:has(> code):has(+ div > table.dataframe) > code { border-radius: 6px 6px 0 0; }
.content pre.nb-output:has(+ div > table.dataframe) { border-radius: 0; }
.content pre.nb-output { background: var(--out-bg); border: 1px solid var(--rule); border-top: none;
  border-radius: 0 0 6px 6px; margin: 0; padding: 2.2rem 1.4rem 1rem; font: 1.28rem/1.3 var(--mono);
  color: var(--ink); white-space: pre; overflow-x: auto; }
.content pre.nb-output::before { content: "output"; left: 1.4rem; right: auto; color: var(--fjord); }
.content .hljs { background: var(--floe); color: var(--ink); }
.content .hljs-keyword, .content .hljs-meta, .content .hljs-built_in, .content .hljs-selector-tag { color: var(--kw); }
.content .hljs-string, .content .hljs-char, .content .hljs-regexp { color: var(--str); }
.content .hljs-number, .content .hljs-literal { color: var(--num); }
.content .hljs-comment, .content .hljs-quote { color: var(--com); font-style: italic; }
.content .hljs-title, .content .hljs-function, .content .hljs-type, .content .hljs-params { color: var(--fn); }
.content .hljs-attribute, .content .hljs-symbol, .content .hljs-variable, .content .hljs-operator, .content .hljs-punctuation { color: var(--ink); }
/* Markdown tables */
.content table { border-collapse: collapse; margin: 1.5rem 0; font-size: 1.4rem; line-height: 1.45;
  border: 1px solid var(--rule); background: var(--floe); display: block; overflow-x: auto; width: max-content; max-width: 100%; }
.content table td, .content table th { padding: .6rem .9rem; border: none; border-bottom: 1px solid var(--rule); }
.content table thead th, .content table thead td { font: 600 1.1rem/1.2 var(--mono); letter-spacing: .08em;
  text-transform: uppercase; color: var(--mute); background: var(--out-bg); text-align: left; }
.content table tbody tr:nth-child(2n) { background: transparent; }
/* DataFrame tables (toHtml in Nim, _repr_html_ in Python): one output cell under the code */
.content div:has(> table.dataframe) { background: var(--out-bg); border: 1px solid var(--rule); border-top: none;
  border-radius: 0 0 6px 6px; padding: 2.2rem 1.4rem 1rem; position: relative; overflow-x: auto; }
.content div:has(> table.dataframe)::before { content: "output"; position: absolute; top: .6rem; left: 1.4rem;
  font: 600 1rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fjord); }
.content div:has(> table.dataframe) small { font: 1.15rem/1.4 var(--mono); color: var(--mute); }
.content table.dataframe { font: 1.25rem/1.4 var(--mono); margin: .3rem 0 0;
  background: var(--floe); border: 1px solid var(--rule); border-radius: 4px; }
.content table.dataframe th, .content table.dataframe td { padding: .3rem .8rem; text-align: right;
  white-space: pre; border-bottom: 1px solid var(--rule); }
.content table.dataframe thead th { font: 600 1.25rem/1.4 var(--mono); letter-spacing: 0; text-transform: none;
  color: var(--ink); background: var(--floe); }
.content table.dataframe thead tr:nth-child(2) td, .content table.dataframe thead tr:nth-child(2) th {
  color: var(--mute); background: var(--out-bg); border-bottom: 2px solid var(--rule); font-weight: 400; }
.content table.dataframe tbody tr:last-child td { border-bottom: none; }
/* Nim / Python tabs */
.nq-tabs { margin: 2rem 0; }
.nq-tablist { display: flex; gap: .4rem; }
.nq-tab { font: 600 1.25rem/1 var(--mono); letter-spacing: .04em; padding: .7rem 1.2rem; cursor: pointer;
  border: 1px solid var(--rule); border-bottom: none; border-radius: 6px 6px 0 0;
  background: transparent; color: var(--mute); }
.nq-tab[aria-selected="true"] { background: var(--floe); color: var(--fjord); box-shadow: inset 0 2px 0 var(--fjord); }
.nq-tab:hover { color: var(--fjord); }
.nq-tab:focus-visible { outline: 2px solid var(--fjord); outline-offset: 2px; }
.nq-panel > pre:first-child { margin-top: 0; }
.nq-panel > pre:first-child > code { border-top-left-radius: 0; }
.nq-python-only { margin: 2rem 0; }
.content blockquote strong { color: var(--ink); }
/* the book's own remarks (and the attribution box), set apart from the original text */
.nq-note { margin: 1.8rem 0; padding: .9rem 1.4rem 1rem; background: var(--floe);
  border: 1px solid var(--rule); border-left: 4px solid var(--num); border-radius: 0 6px 6px 0; }
.nq-note > p.nq-note-label { margin: 0 0 .3rem; font: 700 1.15rem/1.4 var(--display);
  letter-spacing: .08em; text-transform: uppercase; color: var(--num); }
.nq-note > :last-child { margin-bottom: 0; }
.nq-note p, .nq-note li { font-size: .94em; }
/* "Show source": the page's own nimib source, folded at the end */
details.nq-source { margin: 4rem 0 1rem; }
details.nq-source summary { cursor: pointer; width: max-content; font: 600 1.2rem/1 var(--mono);
  letter-spacing: .06em; text-transform: uppercase; color: var(--fjord); padding: .8rem 1.2rem;
  border: 1px solid var(--rule); border-radius: 6px; background: var(--floe); list-style: none; }
details.nq-source summary::-webkit-details-marker { display: none; }
details.nq-source summary::before { content: "Show source"; }
details.nq-source[open] summary::before { content: "Hide source"; }
details.nq-source .nq-source-link { font: 1.2rem/1.4 var(--mono); color: var(--mute); margin: 1rem 0 0; }
.nq-foot { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule);
  font: 1.2rem/1.5 var(--mono); color: var(--mute); }
.content .nq-foot a { color: var(--fjord); }

/* The review mode (book/review.nim, added to every page by bookbuild.nim): its colours from
   the book's palette, and lengths in px where it uses rem (nimibook's rem is 10px). */
html.light, html.rust, html.coal, html.navy, html.ayu {
  --paper: var(--floe); --surface: var(--ice); --line: var(--rule); --shade: var(--rule); --muted: var(--mute);
  --secondary: var(--fjord); --secondary-soft: color-mix(in oklab, var(--fjord) 22%, var(--floe));
  --primary-text: #a3332b; --neutral-1: var(--out-bg); --font: var(--display);
}
html.coal, html.navy, html.ayu { --primary-text: #f08a7e; }
.rv-enter { gap: 6px 12px; margin: 8px 0 20px; font: 13px/1.4 var(--mono); }
.rv-toggle { font: 600 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fjord);
  background: var(--floe); border-radius: 6px; padding: 0 12px; }
mark.rv-mark { color: inherit; }
body.rv-on { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
.rv-bar { gap: 5px; padding-top: 7px; padding-bottom: calc(7px + env(safe-area-inset-bottom, 0px)); }
.rv-bar button { padding: 0 9px; }
.rv-bar .rv-count { min-width: 50px; font-size: 13px; }
dialog.rv-sheet, .rv-panel { max-width: 640px; }
dialog.rv-sheet { padding: 16px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
.rv-panel { padding: 8px max(10px, env(safe-area-inset-right, 0px)) 10px max(10px, env(safe-area-inset-left, 0px)); }
.rv-sheet .rv-where { margin: 0 0 6px; }
.rv-sheet textarea { margin-top: 3px; padding: 8px; }
.rv-sheet .rv-actions, .rv-sheet .rv-left { gap: 6px; }
.rv-sheet button, .rv-bar button { padding-left: 11px; padding-right: 11px; }
.rv-panel .rv-whole, .rv-panel .rv-state { margin: 0 0 5px; font-size: 13px; }
.rv-note { min-height: 52px; max-height: 144px; padding: 8px; }
.rv-thumbs, .rv-shotlist { gap: 8px; }
.rv-thumb img { height: 72px; }
.rv-shot { gap: 8px; font-size: 13px; }
.rv-shot img { height: 44px; }
.rv-versions { margin: 0 0 12px; }
.rv-versions li { gap: 8px; padding: 5px 0; }
.rv-versions .rv-date { font-size: 14px; }
.rv-versions .rv-n { font-size: 13px; }

/* code, folded under its name and its length (book/foldcode.nim) */
details.foldcode { margin: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
details.foldcode + details.foldcode { border-top: 0; }
details.foldcode:not(:has(+ details.foldcode)) { margin-bottom: 24px; }
details.foldcode > summary { list-style: none; cursor: pointer; min-height: 44px; padding: 8px 0; display: flex; gap: 10px;
  align-items: center; font: 14px/1.4 var(--mono); }
details.foldcode > summary::-webkit-details-marker { display: none; }
details.foldcode > summary::before { content: "+"; font-weight: 700; width: 12px; flex: none; color: var(--fjord); }
details.foldcode[open] > summary::before { content: "−"; }
details.foldcode .fc-name { overflow-wrap: anywhere; }
details.foldcode .fc-name code { background: none; padding: 0; font-size: 1em; }
details.foldcode .fc-lines { margin-left: auto; font-size: 12px; color: var(--mute); white-space: nowrap; }
details.foldcode pre { margin: 3px 0 6px; max-height: 70vh; overflow: auto; }
details.foldcode .fc-path { margin: 0 0 12px; font: 12px/1.4 var(--mono); color: var(--mute); }
details.foldcode .fc-path code { background: none; padding: 0; }
.content details.foldcode pre::before { content: none !important; }
