/* 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;
}

html {
--paper: #FCFAF2; --ink: #1C1C1C; --primary: #77428D; --secondary: #0089A7; --warning: #FFB11B; --success: #7BA23F;
--neutral-0: color-mix(in oklab, var(--ink) 0%, var(--paper));
--neutral-1: color-mix(in oklab, var(--ink) 4%, var(--paper));
--neutral-2: color-mix(in oklab, var(--ink) 8%, var(--paper));
--neutral-3: color-mix(in oklab, var(--ink) 14%, var(--paper));
--neutral-4: color-mix(in oklab, var(--ink) 25%, var(--paper));
--neutral-5: color-mix(in oklab, var(--ink) 40%, var(--paper));
--neutral-6: color-mix(in oklab, var(--ink) 55%, var(--paper));
--neutral-7: color-mix(in oklab, var(--ink) 65%, var(--paper));
--neutral-8: color-mix(in oklab, var(--ink) 80%, var(--paper));
--neutral-9: color-mix(in oklab, var(--ink) 100%, var(--paper));
--shade: var(--neutral-1); --line: var(--neutral-3); --muted: var(--neutral-7);
--surface: color-mix(in oklab, #FFFFFF 60%, var(--paper));
--primary-soft: color-mix(in oklab, var(--primary) 22%, var(--paper));
--primary-text: color-mix(in oklab, var(--primary) 50%, var(--ink));
--secondary-soft: color-mix(in oklab, var(--secondary) 22%, var(--paper));
--secondary-text: color-mix(in oklab, var(--secondary) 50%, var(--ink));
--warning-soft: color-mix(in oklab, var(--warning) 22%, var(--paper));
--success-soft: color-mix(in oklab, var(--success) 22%, var(--paper));
--success-text: color-mix(in oklab, var(--success) 50%, var(--ink));
}
/* The look of the tabelline book: nimibook's layout in the Munari look of tabelline's pages,
   with the Edo palette: the fashion colours of old Tokyo. One theme, no switch.
   `nim r book/bookbuild.nim` adds to the end of nimibook's chrome.css (the last stylesheet every
   page loads, so it wins over nimibook's own rules) the palette, `paletteCss(edo)` from
   docs/stile.nim, and then this file.

   The palette is the tokens of tabelline's pages (docs/stile.nim): six values, the Edo ones,
     --paper     白練 shironeri, white silk
     --ink       墨 sumi, ink
     --primary   江戸紫 edomurasaki, Edo purple  the circle: links, the book's notes
     --secondary 新橋 shinbashi, Shinbashi blue  the square: strings, the Python tab
     --warning   山吹 yamabuki, kerria flower    the triangle: highlights, the source box
     --success   萌黄 moegi, fresh sprouts       the fourth: numbers in code
   and every other colour mixed from them (--neutral-0 … --neutral-9 and their names --shade, --line, --muted, --surface, --x-soft, --x-text).
   This file names no colour of its own. nimibook sets html to 62.5%, so 1rem is 10px here. */
@font-face { font-family: "Jost"; src: url("../fonts-edo/jost-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts-edo/jost-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts-edo/jost-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

html.light, html.rust, html.coal, html.navy, html.ayu {
  --text-font: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;

  --bg: var(--paper); --fg: var(--ink); --links: var(--primary-text);
  --inline-code-color: var(--ink);
  --sidebar-bg: var(--paper); --sidebar-fg: var(--ink); --sidebar-active: var(--primary-text);
  --sidebar-non-existant: var(--neutral-6); --sidebar-spacer: var(--line);
  --scrollbar: var(--neutral-6); --icons: var(--ink); --icons-hover: var(--primary);
  --theme-popup-bg: var(--surface); --theme-popup-border: var(--ink); --theme-hover: var(--shade);
  --quote-bg: transparent; --quote-border: var(--warning);
  --table-border-color: var(--line); --table-header-bg: var(--shade); --table-alternate-bg: transparent;
  --searchbar-bg: var(--surface); --searchbar-fg: var(--ink); --searchbar-border-color: var(--ink);
  --searchresults-header-fg: var(--neutral-6); --searchresults-border-color: var(--line);
  --searchresults-li-bg: var(--shade);
  --search-mark-bg: color-mix(in srgb, var(--warning) 55%, var(--paper));
  --content-max-width: 76rem;
  color-scheme: light;
}
html { font-family: var(--text-font); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-size: 1.8rem; line-height: 1.6; }

/* sidebar and menu bar: flat paper, a black rule; the theme menu is gone (one theme) */
.sidebar { font: 400 1.55rem/1.4 var(--text-font); border-right: 2px solid var(--ink); }
.chapter li.chapter-item { line-height: 1.35; }
.chapter li a.active { font-weight: 700; }
.chapter li.part-title { font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 1.15rem; color: var(--primary-text); }
.chapter li strong { color: var(--neutral-6); font-weight: 400; }
#theme-toggle, #theme-list { display: none !important; }
.menu-bar, .menu-bar.bordered { border-bottom: 2px solid var(--ink) !important; }
.menu-title { font: 700 1.6rem/var(--menu-bar-height) var(--text-font); letter-spacing: .16em; text-transform: uppercase; }
.nav-chapters { color: var(--ink); }
.nav-chapters:hover { background: color-mix(in srgb, var(--warning) 40%, transparent); color: var(--ink); }

/* type: one sans, big and plain; the circle before every section heading (one marker: shapes
   mean something, and the triangle is kept for warnings) */
.content main { line-height: 1.6; }
.content h1, .content h2, .content h3, .content h4 { font-family: var(--text-font); font-weight: 700; color: var(--ink);
  letter-spacing: -.015em; line-height: 1.12; text-wrap: balance; }
.content h1 { font-size: clamp(3.4rem, 7vw, 4.8rem); margin: 2rem 0 1.4rem; letter-spacing: -.03em; }
.content h2 { font-size: 2.8rem; margin: 4rem 0 1rem; position: relative; padding-left: 3.4rem; }
.content h2::before { content: ""; position: absolute; left: 0; top: .18em; width: 2.2rem; height: 2.2rem;
  background: var(--primary); border-radius: 50%; }
.content h3 { font-size: 2.1rem; margin-top: 2.8rem; color: var(--primary-text); }
/* a heading inside a table (a title written as <h1> or <h2>) is the table's, not a section of the page */
.content table :is(h1, h2, h3, h4) { font-size: revert; margin: .3em 0; padding: 0; letter-spacing: normal; }
.content table h2::before { content: none; }
.content p, .content li { max-width: 68ch; }
.content a, .content a:link, .content a:visited { color: var(--ink); text-decoration: underline;
  text-decoration-color: var(--primary); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.content a:hover { background: color-mix(in srgb, var(--warning) 55%, transparent); }
.content .header:link, .content .header:visited { color: var(--ink); text-decoration: none; }
.content img { max-width: 100%; border: 2px solid var(--ink); }
.content table img { border: 0; }  /* a picture in a cell (fmtImage) is part of the table, not a figure */
blockquote { border-left: 6px solid var(--warning); border-top: 0; border-bottom: 0; margin: 1.5rem 0; padding: .2rem 1.6rem; }

/* code: a white sheet with a black edge; outputs on grey paper. Code is smaller than text. */
code, pre, pre code, .hljs { font-family: var(--mono) !important; font-variant-ligatures: none; }
:not(pre) > code { font-size: .84em; background: var(--shade); padding: .1em .3em; border-radius: 0; color: var(--ink); }
.content pre { margin: 1.2rem 0 0; position: relative; }
body .content pre > code, body .content pre > code.hljs { display: block; background: var(--surface); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 0; padding: 1.2rem 1.4rem; font-size: 1.3rem; line-height: 1.55;
  overflow-x: auto; }
.content pre.nb-output { background: var(--shade); border: 2px solid var(--ink); border-top: 0; margin: 0;
  padding: 1rem 1.4rem; font: 1.25rem/1.45 var(--mono); color: var(--ink); white-space: pre; overflow-x: auto; }
.content pre.tb-error { color: var(--primary-text); }
.content .hljs-keyword, .content .hljs-built_in { color: var(--primary-text); font-weight: 700; }
.content .hljs-string { color: var(--secondary-text); }
.content .hljs-number, .content .hljs-literal { color: var(--success-text); }
.content .hljs-comment { color: var(--neutral-6); font-style: italic; }
.content .hljs-type { color: var(--ink); font-weight: 700; }
.content .hljs-meta, .content .hljs-operator, .content .hljs-punctuation { color: var(--ink); }

/* Markdown tables (not the tables the examples make) */
.content table:not(.gt_table):not(.tb_table) { border-collapse: collapse; margin: 1.5rem 0; font-size: 1.5rem; line-height: 1.45;
  border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); display: block; overflow-x: auto;
  width: max-content; max-width: 100%; }
.content table:not(.gt_table):not(.tb_table) td, .content table:not(.gt_table):not(.tb_table) th { padding: .5rem .9rem; border: 0;
  border-bottom: 1px solid var(--line); text-align: left; }
.content table:not(.gt_table):not(.tb_table) thead { background: transparent; }
.content table:not(.gt_table):not(.tb_table) thead th { font-weight: 700; border-bottom: 2px solid var(--ink); }

/* the tables of the examples: each library's own CSS, with nimibook's generic table rules undone */
.content .tabella, .gt-output { background: var(--surface); border: 2px solid var(--ink); border-top: 0; padding: 1.4rem 1rem;
  overflow-x: auto; }
.content .tabella table tr, .gt-output table tr { background: transparent; }
.content .tabella table, .gt-output table { margin-left: auto; margin-right: auto; }
.gt-output > div { padding-top: 0 !important; padding-bottom: 0 !important; }
.gt-output table.dataframe { border-collapse: collapse; font: 1.3rem/1.4 var(--mono); }
.gt-output table.dataframe td, .gt-output table.dataframe th { padding: .3rem .8rem; border: 0; border-bottom: 1px solid var(--line); text-align: right; }
.gt-output table.dataframe thead { background: transparent; }

/* 👑 Nim / 🐍 Python / 🏴‍☠️ R tabs: one flat sheet each, the chosen one with a coloured edge */
.tb-tabs { margin: 2rem 0 2.4rem; }
.tb-tablist { display: flex; gap: 0; }
.tb-tab { font: 700 1.2rem/1 var(--text-font); letter-spacing: .14em; text-transform: uppercase; padding: .8rem 1.4rem;
  cursor: pointer; border: 2px solid var(--ink); border-bottom: 0; background: transparent; color: var(--ink); }
.tb-tab + .tb-tab { border-left: 0; }
.tb-tab[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.tb-tab[data-lang="python"][aria-selected="true"] { background: var(--secondary-text); }
.tb-tab[data-lang="r"][aria-selected="true"] { background: var(--success-text); }
.tb-no-r { font-style: italic; margin: 1rem 0; }
.tb-tab:focus-visible { outline: 3px solid var(--warning); outline-offset: 2px; }
.tb-panel > pre:first-child, .tb-panel > :first-child { margin-top: 0; }
.tb-panel[hidden] { display: none !important; }

/* the book's own remarks, and the attribution: flat coloured paper, its colour along the top edge */
.tb-note { margin: 1.8rem 0; padding: 1rem 1.6rem 1.1rem; background: color-mix(in srgb, var(--primary) 12%, var(--paper));
  border-top: 5px solid var(--primary); }
.tb-note > p.tb-note-label { margin: 0 0 .3rem; font: 700 1.15rem/1.4 var(--text-font); letter-spacing: .16em;
  text-transform: uppercase; color: var(--primary-text); }
.tb-note > :last-child { margin-bottom: 0; }
.tb-note p, .tb-note li { font-size: .95em; }
.tb-note pre > code { font-size: 1.25rem; }

/* "Show source": the page's own nimib source, folded at the end */
details.tb-source { margin: 4rem 0 1rem; }
details.tb-source summary { cursor: pointer; width: max-content; font: 700 1.2rem/1 var(--text-font); letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink); padding: .8rem 1.2rem; border: 2px solid var(--ink);
  background: transparent; list-style: none; }
details.tb-source summary::-webkit-details-marker { display: none; }
details.tb-source summary::before { content: "Show source"; }
details.tb-source[open] summary::before { content: "Hide source"; }
details.tb-source[open] summary { background: var(--ink); color: var(--paper); }
details.tb-source .tb-source-link { font-size: 1.4rem; color: var(--neutral-6); margin: 1rem 0 0; }
.tb-foot { margin-top: 3rem; padding-top: 1rem; border-top: 2px solid var(--ink); font-size: 1.4rem; color: var(--neutral-6); }
.tb-foot .motto { display: block; font: 700 1.8rem/1.3 var(--text-font); color: var(--ink); margin: 0 0 .4rem; }

/* the six premade styles side by side (Premade Themes), small */
/* small tables side by side (sideBySide in tabbook.nim): as many as fit, one on a phone */
.tb-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr)); gap: 0 2rem; align-items: start; margin: 2rem 0 2.4rem; }
.tb-side > .tb-tabs { margin: 0 0 1.6rem; min-width: 0; }
.tb-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); gap: 1.6rem; }
.tb-styles table { zoom: 60%; }
.gt-output .tb-styles > div > div, .tb-panel .tb-styles > div > div { font-weight: 700; }

/* a finder (finder/choices/choice in tabbook.nim): links drawn as plain buttons; a link shows
   the part with its id (:target), the others stay hidden; no script needed */
.tb-choices .tabella a, .tb-choices .tabella a:link, .tb-choices .tabella a:visited {
  display: inline-block; margin: .2rem .2rem .2rem 0; padding: .3rem .7rem; border: 1.5px solid var(--ink);
  background: var(--paper); color: var(--ink); text-decoration: none; font-size: 1.35rem; line-height: 1.3; }
.tb-choices .tabella a strong { font-weight: 400; color: var(--muted); margin-left: .3rem; }
.tb-choices .tabella a:hover { background: color-mix(in srgb, var(--warning) 55%, transparent); }
.tb-choices .tabella a[aria-current="true"] { background: var(--ink); color: var(--paper); }
.tb-choices .tabella a[aria-current="true"] strong { color: var(--paper); }
.tb-choices .tabella a:focus-visible { outline: 3px solid var(--warning); outline-offset: 2px; }
.tb-choice { display: none; scroll-margin-top: 6rem; }
.tb-choice:target { display: block; }
.tb-finder:has(.tb-choice:target) .tb-no-choice { display: none; }
/* each table brings its own CSS, scoped by its id: only !important wins over it */
.tb-choices .tabella td, .tb-choices .tabella th { vertical-align: top !important; }
