@font-face{font-family:'Patrick Hand';src:url(fonts/patrick-hand.woff2) format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Atkinson Hyperlegible';src:url(fonts/atkinson-regular.woff2) format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Atkinson Hyperlegible';src:url(fonts/atkinson-bold.woff2) format('woff2');font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:'Atkinson Hyperlegible';src:url(fonts/atkinson-italic.woff2) format('woff2');font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:'Jost';src:url(fonts/jost-400-normal.woff2) format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Jost';src:url(fonts/jost-400-italic.woff2) format('woff2');font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:'Jost';src:url(fonts/jost-700-normal.woff2) format('woff2');font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:'Gentium Book Plus';src:url(fonts/gentium-regular.woff2) format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Gentium Book Plus';src:url(fonts/gentium-italic.woff2) format('woff2');font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:'Gentium Book Plus';src:url(fonts/gentium-bold.woff2) format('woff2');font-weight:700;font-style:normal;font-display:swap}
html {
  --m-carta: #FCFAF2; --m-inchiostro: #1C1C1C; --m-cerchio: #E16B8C;
  --m-quadrato: #7DB9DE; --m-triangolo: #F7D94C; --m-quarto: #86C166;
  --paper: var(--m-carta); --ink: var(--m-inchiostro); --primary: var(--m-cerchio);
  --secondary: var(--m-quadrato); --warning: var(--m-triangolo); --success: var(--m-quarto);
--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));
}
html[data-tema="quaderno"] {
--paper: #FDFDF9; --ink: #2B2D38; --primary: #1F4E99; --secondary: #5B9BD5; --warning: #FFD84D; --success: #3FA34D;
}
html[data-tema="minoan"] {
--paper: #EFE6D2; --ink: #1E1A17; --primary: #C3693C; --secondary: #3F7FA6; --warning: #D9A441; --success: #6E8B5A;
}
html {
  --hand: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --font: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  /* the quaderno's own motifs, kept here for the dated posts' own CSS */
  --grid: #D9E7F5;          /* the squares */
  --margin: #E9585B;        /* the red margin rule */
  --postit: #FFF6B8;        /* sticky notes */
  --highlight: rgba(255, 230, 90, .55);
  --tape: rgba(255, 214, 165, .75);
  --edge: #C9D9EC;          /* pale blue rules */
  --red-pen: #C62828;       /* corrections, subheadings, stamps */
  --sq: 20px;               /* one square, about 5 mm */
  /* names from before the tokens, for the dated posts' own CSS */
  --pencil: var(--ink); --pen: var(--ink); --pen-red: var(--primary-text);
  --card: var(--surface); --rule: var(--line); --carta: var(--shade);
  --text: var(--font); --n-0: var(--neutral-0); --n-1: var(--neutral-1); --n-2: var(--neutral-2); --n-3: var(--neutral-3); --n-4: var(--neutral-4);
  --n-5: var(--neutral-5); --n-6: var(--neutral-6); --n-7: var(--neutral-7); --n-8: var(--neutral-8); --n-9: var(--neutral-9);
  --giallo: var(--warning); --blu: var(--secondary);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 18px/1.6 var(--font); background-color: var(--paper);
  padding: 0 max(14px, env(safe-area-inset-right, 0px)) 0 max(14px, env(safe-area-inset-left, 0px));
}
body > header, body > main, body > footer { max-width: 50rem; margin: 0 auto; position: relative; }
main { padding-bottom: 2rem; }
header { padding-top: .4rem; }

/* the cover: the three shapes over each other, like sheets of coloured acetate */
.forme { display: block; position: absolute; top: 6.3rem; right: 0; width: 9.5rem; height: 8.5rem; pointer-events: none; }
.forme i { position: absolute; display: block; mix-blend-mode: multiply; }
.forme .cerchio { width: 6.2rem; height: 6.2rem; border-radius: 50%; background: var(--primary); right: 0; top: 0; }
.forme .quadrato { width: 4.6rem; height: 4.6rem; background: var(--secondary); right: 3.6rem; top: 2.6rem; }
.forme .triangolo { width: 5.6rem; height: 4.9rem; background: var(--warning); right: 1.2rem; top: 3.6rem;
  clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.etichetta { margin: 2.4rem 0 1.4rem; position: relative; padding: 0 10.5rem 0 0; min-height: 8.5rem; }
.etichetta .riga span:first-child { display: none; }
.etichetta .riga span:last-child { font: 400 1.25rem/1.3 var(--font); color: var(--ink); }
.etichetta .nome span:last-child { font: 700 3.4rem/1 var(--font); letter-spacing: -.03em; }
.etichetta .riga:last-child:not(.nome) span:last-child { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.etichetta .nome a { color: inherit; text-decoration: none; }
@media (max-width: 560px) {
  .forme { transform: scale(.62); transform-origin: top right; top: 6rem; }
  .etichetta { padding-right: 6.4rem; min-height: 6rem; }
  .etichetta .nome span:last-child { font-size: 2.5rem; }
}
.crumbs { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1rem;
  font: 700 .74rem/1 var(--font); letter-spacing: .16em; text-transform: uppercase; }
.crumbs a { color: var(--ink); text-decoration: none; }
.crumbs .lingua b { border-bottom: 2px solid currentColor; }   /* the page's language, the others links */
.lede { font-size: 1.3rem; line-height: 1.45; color: var(--ink); margin: 0 0 1.2rem; }
.kicker { font: 700 .74rem/1 var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--primary-text); margin: 0; }

/* type: one sans, big and plain; sections marked by the circle */
h1, h2, h3, h4 { font-family: var(--font); font-weight: 700; color: var(--ink); letter-spacing: -.015em; line-height: 1.15; }
h1 { font-size: 2.9rem; line-height: 1.05; margin: 1.5rem 0 .4rem; }
h2 { font-size: 1.85rem; display: block; padding: 0 0 0 2.4rem; margin: 3rem 0 .9rem; position: relative; scroll-margin-top: 1rem; }
h2::before { content: ""; position: absolute; left: 0; top: .2em; width: 1.5rem; height: 1.5rem;
  background: var(--part, var(--primary)); border-radius: 50%; }
h3 { font-size: 1.25rem; color: var(--primary-text); margin: 2rem 0 .5rem; scroll-margin-top: 1rem; }
h2 .num { color: var(--muted); margin-right: .35rem; }
a { color: var(--ink); text-decoration-color: var(--primary); text-decoration-thickness: 2px; text-underline-offset: 2px; }
a:hover { background: var(--primary-soft); }
strong { font-weight: 700; }
p, li { max-width: 46rem; }
blockquote { margin: 1.2rem 0; padding: .7rem 1rem; border-left: 6px solid var(--neutral-4); }
blockquote p { margin: .3rem 0; }
hr { border: 0; border-top: 2px solid var(--ink); margin: 2rem 0; }
mark { background: var(--warning-soft); padding: 0 .15em; }
img { max-width: 100%; }
table td img { max-width: none; }
/* a label with a picture before it (besidePicture): the text beside the picture, not under it */
.beside-picture { display: inline-block; vertical-align: middle; max-width: 48rem; margin-left: .8rem; white-space: normal; }
/* a block wider than the text (nbWide), centred on the page, up to the window's width */
.wide { width: min(96vw, 92rem); position: relative; left: 50%; transform: translateX(-50%); }   /* a picture in a table keeps its size (fmtImage), or a column with no width squeezes it */

/* code: a white sheet with a black edge; outputs on grey paper */
pre { margin: 1rem 0; }
pre > code, pre.nb-output { display: block; overflow-x: auto; font: 13px/1.55 var(--mono); padding: .8rem 1rem; }
body pre > code { font-size: 13px; }
pre > code { background: var(--surface); border: 2px solid var(--ink); }
pre.nb-output { background: var(--shade); border: 0; white-space: pre; color: var(--ink); }
pre.nb-output::before { content: "output"; display: block; margin-bottom: .1rem;
  font: 700 .66rem/1.4 var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--primary-text); }
:not(pre) > code { font: .88em var(--mono); background: var(--shade); padding: .05em .3em; }
.hljs-keyword { color: var(--primary-text); font-weight: 700; } .hljs-string { color: var(--secondary-text); }
.hljs-number, .hljs-literal { color: var(--success-text); }
.hljs-comment { color: var(--muted); font-style: italic; } .hljs-type { color: var(--ink); font-weight: 700; }
.hljs-built_in { color: var(--primary-text); } .hljs-meta { color: var(--muted); }

/* tables: no tape, no squares; the rules come from optCssTheme(), from the tokens */
.tabella { position: relative; margin: 1.6rem 0 1.8rem; padding: 16px 0 10px; }
.tabella .tb_title { font-family: var(--hand); font-size: 125%; letter-spacing: -.01em; }
.tabella td code { overflow-wrap: anywhere; }  /* long names in a cell wrap on a phone */
main table:not(.tb_table) { border-collapse: collapse; margin: 1rem 0; background: var(--surface); }
main table:not(.tb_table) th, main table:not(.tb_table) td { border: 1px solid var(--line); padding: .35rem .6rem; text-align: left; vertical-align: top; }

/* the indice: numbers on circles, as the section headings */
.indice { padding: 1rem 0; margin: 1.4rem 0 2rem; max-width: 36rem;
  border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.indice h2.indice-title { font: 700 .78rem/1 var(--font); letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink); padding: 0; margin: 0 0 .9rem; display: block; }
.indice h2.indice-title::before { display: none; }
.indice ol { margin: 0; }
.indice > ol { list-style: none; padding: 0; counter-reset: voce; font: 500 1.08rem/1.5 var(--font); }
.indice > ol > li { counter-increment: voce; position: relative; padding-left: 2.3rem; margin: .35rem 0; }
.indice > ol > li::before { content: counter(voce); position: absolute; left: 0; top: .1rem; width: 1.5rem; height: 1.5rem;
  border-radius: 50%; background: var(--primary); color: #fff; font: 700 .78rem/1.5rem var(--font); text-align: center; }
.indice > ol > li.parte-secondary::before { background: var(--secondary); color: var(--ink); }
.indice > ol > li.parte-success::before { background: var(--success); color: var(--ink); }
.indice ol ol { font: 400 .95rem/1.45 var(--font); padding-left: 0; margin: .15rem 0 .3rem; list-style: none; }
/* back to the indice: an arrow at the end of every heading, on the pages that have an indice */
.su { display: none; margin-left: .45rem; padding: .2em .45em; font-size: .55em; vertical-align: .25em;
  color: var(--muted); text-decoration: none; border: 1px solid var(--line); line-height: 1; }
.su::before { content: "↑"; }
.su:hover, .su:focus-visible { color: var(--ink); border-color: var(--ink); }
body:has(#indice) .su { display: inline-block; }
.indice ol ol li::before { content: "— "; color: var(--muted); }
sup.cite { font: 700 .68em/0 var(--font); margin-left: .1em; }
sup.cite a { text-decoration: none; }
ol.sources { padding-left: 1.8rem; }
ol.sources li { margin: .35rem 0; scroll-margin-top: 1rem; }
ol.sources li::marker { font: 700 .9em var(--font); color: var(--primary-text); }
ol.sources li:target { background: var(--primary-soft); }
.cite-back { text-decoration: none; }
.indice a { text-decoration-line: none; color: var(--ink); }
.indice a:hover { text-decoration-line: underline; }

/* sheets set apart (notes, cards, gallery cards): flat paper with the square's straight top edge,
   in the colour of their kind; nothing on them to press. A warning carries the triangle. */
.nota { padding: 1rem 1.2rem; margin: 1.3rem 0; background: var(--shade); border-top: 5px solid var(--ink); }
.nota.info { background: var(--secondary-soft); border-top-color: var(--secondary); }
.nota.done, .nota.code { background: var(--success-soft); border-top-color: var(--success); }
.nota.missing { background: var(--primary-soft); border-top-color: var(--primary); }
.nota.warning { background: var(--warning-soft); border-top-color: var(--warning); }
.nota > :first-child { margin-top: 0; } .nota > :last-child { margin-bottom: 0; }
.nota .titolo { font: 700 1.1rem var(--font); color: var(--ink); display: block; }
.nota .numero { font: 700 .72rem/1.2 var(--font); letter-spacing: .14em; color: var(--muted); display: block; }
.nota.warning { position: relative; padding-left: 3.1rem; }
.nota.warning::before, .nota.warning::after { content: ""; position: absolute; left: 1.1rem; top: 1.1rem; width: 1.4rem; height: 1.25rem;
  clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.nota.warning::before { background: var(--ink); }
.nota.warning::after { background: var(--warning); transform: scale(.7); transform-origin: 50% 68%; }
.timbro { display: inline-block; font: 700 .8rem/1.6 var(--font); letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); border: 2px solid var(--ink); padding: 0 .5rem; }
.timbro.ok { color: var(--success-text); border-color: var(--success); }
.timbro.ko { background: var(--primary-soft); }

/* cards (nbCards, nbCard): a grid of notes */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.cards .nota { margin: 0; }
.cards .nota .titolo + p { margin-top: .3rem; }

/* a gallery (nbGallery, nbGalleryCard): cards to swipe sideways, numbered */
.nb-galleria { display: flex; align-items: flex-start; gap: .8rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: .2rem 0 .8rem; counter-reset: nb-scheda; -webkit-overflow-scrolling: touch; }
.nb-galleria::after { content: ""; flex: 0 0 .2rem; }
.nb-galleria > .nb-scheda { flex: 0 0 min(84%, 24rem); scroll-snap-align: start; overflow-x: auto; padding: .7rem .9rem .8rem;
  background: var(--shade); border: 0; border-top: 5px solid var(--secondary); counter-increment: nb-scheda; }
.nb-galleria > .nb-scheda::before { content: counter(nb-scheda); display: block; font: 700 .72rem/1.2 var(--font); letter-spacing: .14em; color: var(--muted); }
.nb-galleria > .nb-scheda > h3 { margin: .15rem 0 .4rem; font-size: 1.15rem; }
.nb-galleria > .nb-scheda[data-label]::before { content: attr(data-label) " · " counter(nb-scheda); text-transform: uppercase; }
.nb-galleria > .nb-scheda p { font-size: .94rem; line-height: 1.45; margin: 0 0 .5rem; }
.nb-scheda pre { margin: .4rem 0; }
body .nb-scheda pre > code { font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.nb-scheda .tabella { margin: .4rem 0 0; }
.nb-scheda .tabella table { font-size: 14px !important; }
.accanto { display: flex; flex-wrap: wrap; gap: 0 .6rem; justify-content: center; align-items: flex-start; }

/* tabs (nbTabs): the same example in Nim, Python and R; the choice holds for the whole page */
.lingue { margin: 1.2rem 0; }
.lingue-tab { display: flex; gap: 0; flex-wrap: wrap; }
.lingue-tab button { font: 700 .72rem/1.6 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
  background: transparent; border: 2px solid var(--ink); border-bottom: 0; padding: .15rem .8rem; cursor: pointer; margin-right: -2px; }
.lingue-tab button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.lingue-pannello { border-top: 2px solid var(--ink); padding-top: .2rem; }
.lingue-pannello > pre:first-child { margin-top: .6rem; }

/* the code of a table, folded under it (nbShowCode) */
details.codice { margin: -.8rem 0 1.6rem; }
details.codice > summary { list-style: none; cursor: pointer; display: inline-block; font: 700 .68rem/1.6 var(--font);
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink); border-bottom: 2px solid var(--secondary); }
details.codice > summary::-webkit-details-marker { display: none; }
details.codice > summary::before { content: "+ show code"; }
details.codice[open] > summary::before { content: "− hide code"; }
details.codice pre { margin: .4rem 0 0; }
body /* a drawing (nbDrawing): a Pele diagram in the page's colours */
.disegno { margin: 1.4rem 0; }
.disegno svg { display: block; max-width: 100%; height: auto; margin: 0 auto; --pele-bg: var(--paper); --pele-fg: var(--ink);
  --pele-muted: var(--muted); --pele-line: var(--ink); --pele-border: var(--ink); --pele-surface: var(--surface);
  --pele-surface-alt: var(--neutral-1); --pele-accent: var(--secondary); }
/* a map (an SVG with class map, from a story's data): its parts in the page's colours */
.disegno svg.map .sea { fill: var(--surface); }
.disegno svg.map .land { fill: var(--neutral-2); stroke: var(--neutral-4); stroke-width: 1; }
.disegno svg.map .main { fill: var(--secondary); }
.disegno svg.map .limit { fill: none; stroke: var(--secondary-text); stroke-width: 1.5; stroke-dasharray: 6 4; }
.disegno svg.map .dot { fill: var(--primary); stroke: var(--surface); stroke-width: 1.5; }
.disegno svg.map .listed { fill: var(--secondary); stroke: var(--surface); stroke-width: 1.5; }
.disegno svg.map .other { fill: var(--primary); }
.disegno svg.map text { font-family: inherit; }
.disegno svg.map .sea-name { fill: var(--muted); font-style: italic; letter-spacing: 1.5px; }
.disegno svg.map .name { fill: var(--ink); font-weight: 600; paint-order: stroke; stroke: var(--surface);
  stroke-width: 5px; stroke-linejoin: round; }
.disegno figcaption { margin-top: .5rem; font-size: .9rem; color: var(--muted); }
body details.codice pre > code { font-size: 12.5px; }

/* code, folded under its name and its length (nbFoldCode) */
details.foldcode { margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
details.foldcode + details.foldcode { border-top: 0; }
details.foldcode:not(:has(+ details.foldcode)) { margin-bottom: 1.6rem; }
details.foldcode > summary { list-style: none; cursor: pointer; padding: .45rem 0; display: flex; gap: .6rem;
  align-items: baseline; }
details.foldcode > summary::-webkit-details-marker { display: none; }
details.foldcode > summary::before { content: "+"; font-weight: 700; width: .8rem; color: var(--secondary); }
details.foldcode[open] > summary::before { content: "−"; }
details.foldcode > summary > span { margin-left: auto; font-size: .8rem; white-space: nowrap; }
details.foldcode pre { margin: .2rem 0 .8rem; }
body details.foldcode pre > code { font-size: 12.5px; }

/* the parts of a table (nbParts): a switch between the data and its parts, and their legend */
.parti { list-style: none; padding: 0; margin: .8rem 0; }
.parti li { margin: .35rem 0; padding-left: 2rem; position: relative; line-height: 1.45; }
.tinta-parte { position: absolute; left: 0; top: .25em; width: 1.3rem; height: 1rem; outline: 1px solid var(--line); }
.parti .colore { color: var(--muted); font-size: .88em; }
.mostra-parti { font: 700 .72rem/1.6 var(--font); letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
  border: 2px solid var(--ink); background: transparent; color: var(--ink); padding: .3rem .8rem; margin: .2rem 0 0; }
.mostra-parti[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* swatches (nbSwatches): a colour beside its name */
.tinte { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .8rem; margin: 1rem 0; }
.tinte .tinta { font-size: .86rem; line-height: 1.35; }
.tinte .tinta span { display: block; height: 2.4rem; margin-bottom: .3rem; outline: 1px solid var(--neutral-2); }
.tinte .tinta strong { display: block; font-size: .95rem; }
/* in a gallery card the swatches are small, three to a row */
.nb-scheda .tinte { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.nb-scheda .tinte .tinta { font-size: .78rem; line-height: 1.25; }
.nb-scheda .tinte .tinta span { height: 1.4rem; margin-bottom: .2rem; }
.nb-scheda .tinte .tinta strong { font-size: .82rem; }

/* a tournament (nbTournament): rounds of matches, two buttons each, and the result to copy */
.torneo { margin: 1rem 0 1.4rem; }
.torneo-turno { margin: 1.2rem 0 .45rem; font: 700 .76rem/1.2 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.torneo-partite { display: grid; gap: .8rem; }
.torneo-partita { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.torneo-num { grid-column: 1 / -1; font-size: .74rem; color: var(--muted); display: flex; justify-content: space-between; align-items: baseline; }
.torneo-undo { font: inherit; font-size: .74rem; color: var(--ink); background: none; border: 0; padding: .1rem 0 .1rem .6rem;
  text-decoration: underline; text-decoration-color: var(--primary); cursor: pointer; }
.torneo-player { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--paper); min-height: 3.4rem; }
.torneo-open { flex: 1; display: flex; flex-direction: column; align-items: stretch; gap: .3rem; text-align: left; font: inherit;
  color: var(--ink); background: none; border: 0; border-radius: 0; padding: .45rem .55rem .45rem; cursor: pointer;
  -webkit-tap-highlight-color: transparent; }
.torneo-open strong { font-size: .88rem; line-height: 1.25; }
.torneo-what { font-size: .74rem; color: var(--muted); }
.torneo-keep { font: inherit; font-size: .78rem; color: var(--ink); background: var(--shade); border: 0; border-top: 1px solid var(--line);
  border-radius: 0; padding: .35rem .55rem; text-align: left; cursor: pointer; }
.torneo-player.torneo-in { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.torneo-player.torneo-in .torneo-keep { background: var(--primary-soft); font-weight: 700; }
.torneo-player.torneo-out .torneo-open { opacity: .45; }
.torneo-player.torneo-unknown { border-style: dashed; padding: .45rem .55rem; justify-content: center; }
.torneo-dialog { width: min(34rem, calc(100% - 1.4rem)); max-height: 86vh; padding: 0; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); display: none; flex-direction: column; }
.torneo-dialog[open] { display: flex; }
.torneo-dialog::backdrop { background: color-mix(in oklab, var(--ink) 45%, transparent); }
.torneo-dialog-card { overflow-y: auto; padding: .4rem .4rem 0; }
.torneo-dialog .nb-galleria { display: block; overflow: visible; padding: 0; margin: 0; }
.torneo-dialog .nb-galleria > .nb-scheda { flex: none; overflow: visible; }
.torneo-dialog .nb-galleria > .nb-scheda::before { display: none; }
.torneo-dialog-bar { display: flex; gap: .5rem; padding: .6rem; border-top: 1px solid var(--line); background: var(--paper); }
.torneo-dialog-bar button { font: inherit; font-size: .92rem; padding: .45rem .9rem; border: 1px solid var(--line); background: var(--shade);
  color: var(--ink); border-radius: 0; cursor: pointer; }
.torneo-dialog-bar .torneo-dialog-keep { flex: 1; border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); font-weight: 700; }
.torneo-tinte { display: flex; height: .5rem; }
.torneo-tinte i { flex: 1; }
.torneo-bye { margin: 0; font-size: .85rem; color: var(--muted); }
.torneo-fine { margin-top: 1.2rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.torneo-esito { flex: 1 1 100%; margin: 0; font-weight: 700; }
.torneo-fine button { font: inherit; font-size: .9rem; padding: .4rem .8rem; background: var(--shade); color: var(--ink);
  border: 1px solid var(--line); border-radius: 0; cursor: pointer; }
.torneo-fine textarea { flex: 1 1 100%; min-height: 10rem; font: 12.5px/1.4 ui-monospace, Menlo, monospace; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); }

/* parts of a long page (nbPart): a label, then the sections' circles take the part's colour */
.parte { font: 700 .74rem/1 var(--font); letter-spacing: .2em; text-transform: uppercase; margin: 3.4rem 0 -1.2rem; color: var(--muted); }
.parte-secondary ~ :is(h2, .titolo-foto) { --part: var(--secondary); } .parte-success ~ :is(h2, .titolo-foto) { --part: var(--success); }
/* a later part wins over an earlier one, whatever its colour: one more class for the second part on */
.parte ~ .parte-primary ~ :is(h2, .titolo-foto) { --part: var(--primary); }
.parte ~ .parte-secondary ~ :is(h2, .titolo-foto) { --part: var(--secondary); }
.parte ~ .parte-success ~ :is(h2, .titolo-foto) { --part: var(--success); }

/* a section's heading over a photo (nbPhotoHeading): the photo as wide as the text and low, the
   heading over its lower edge in the paper's colour, on a band of ink dark enough for any photo
   (a pale sky too), and in every look (one more class than a look's own heading colour); while
   the photo loads, the band is the shade; the credit small, under it */
.titolo-foto { margin: 3rem 0 1rem; }
.titolo-foto-img { position: relative; background: var(--shade); aspect-ratio: 2 / 1; max-height: 11rem; width: 100%; }
.titolo-foto-3 .titolo-foto-img { max-height: 8.5rem; }
.titolo-foto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.titolo-foto .titolo-foto-img :is(h2, h3) { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; color: var(--paper);
  padding: 2.6rem .8rem .7rem 3.2rem; text-shadow: 0 1px 3px color-mix(in oklab, var(--ink) 70%, transparent);
  background: linear-gradient(transparent, color-mix(in oklab, var(--ink) 70%, transparent) 45%, color-mix(in oklab, var(--ink) 88%, transparent)); }
.titolo-foto h2::before { left: .8rem; top: auto; bottom: .85rem; box-shadow: 0 0 0 2px var(--paper); }
.titolo-foto .titolo-foto-img h3 { padding-left: .8rem; font-style: normal; font-weight: 700; }
.titolo-foto .su { color: var(--paper); border-color: color-mix(in oklab, var(--paper) 60%, transparent); text-shadow: none; }
.titolo-foto figcaption { margin-top: .35rem; font-size: .78rem; line-height: 1.35; color: var(--muted); }
.titolo-foto figcaption a { color: var(--muted); }

/* the specs page (nbSpecs): each capability folds open; examples carry a pass stamp */
details.spec { background: var(--shade); border: 0; border-top: 5px solid var(--secondary); margin: .8rem 0; padding: .5rem 1rem; }
details.spec > summary { cursor: pointer; font-size: 1.1rem; }
details.spec > summary b { font: 700 1.2rem var(--font); color: var(--ink); margin-right: .4rem; }
details.spec .counts { color: var(--muted); font-size: .85rem; }
details.spec .purpose { display: block; color: var(--ink); font-size: .95rem; margin: .2rem 0 .3rem; }
.req { border-top: 2px dashed var(--line); padding: .4rem 0 .6rem; }
.req h4 { font: 700 1rem var(--font); color: var(--primary-text); margin: .6rem 0 .2rem; }
.example { margin: .6rem 0 1rem; }
.example .ex-head { display: flex; gap: .6rem; align-items: center; font-size: .8rem; color: var(--muted); }
.ex-out summary { cursor: pointer; font: 700 1rem var(--font); color: var(--muted); }
.scen { background: var(--paper); padding: .4rem .8rem; margin: .5rem 0; }
.scen-name { font: 700 1rem var(--font); color: var(--ink); }
.scen ul { margin: .2rem 0; padding-left: 1.2rem; }
.kw { font: 600 .75rem var(--font); letter-spacing: .08em; padding: 0 .3rem; border-radius: 4px; }
.kw.when { background: var(--secondary-soft); } .kw.then { background: var(--success-soft); } .kw.and, .kw.given { background: var(--neutral-2); }
.src { font-size: .8rem; color: var(--muted); }
details.links summary { cursor: pointer; }

/* a part of a page folded under a line (nbFold): closed at first */
details.fold { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); margin: 1rem 0 1.6rem; }
details.fold > summary { list-style: none; cursor: pointer; padding: .55rem 0; display: flex; gap: .6rem; font: 700 1rem var(--font); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "+"; width: .8rem; color: var(--secondary); }
details.fold[open] > summary::before { content: "−"; }
details.fold[open] > summary { border-bottom: 1px solid var(--line); }

/* the API reference (nbApi): one sheet per name, its straight top edge in ink */
.api { border-top: 2px solid var(--ink); margin: 1.6rem 0 0; padding: .3rem 0 .2rem; scroll-margin-top: 1rem; }
.api h4 { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin: .2rem 0 .4rem; }
.api h4 code { font: 700 1.05rem var(--mono); color: var(--ink); background: none; padding: 0; overflow-wrap: anywhere; }
.api .api-anchor { margin-left: auto; font: 700 1rem var(--font); color: var(--muted); text-decoration: none; padding: 0 .3rem; }
.api .api-anchor:hover, .api:target .api-anchor { color: var(--primary-text); }
.api .api-kind { font: 700 .7rem/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.api pre.api-sig { margin: .3rem 0; }
.api > p { margin: .4rem 0; }
.api > p code, .api li code { overflow-wrap: anywhere; }
.api .api-none { color: var(--muted); font-style: italic; }
.api .api-links { font-size: .82rem; color: var(--muted); }
.api .api-links a { color: var(--ink); }
.api details.api-ex { margin: .5rem 0; }
.api details.api-ex > summary { cursor: pointer; font: 700 .9rem var(--font); color: var(--muted); }

/* the look switch: ink, the selected one filled */
.tema { display: flex; justify-content: flex-end; gap: 0; margin: .6rem 0 0; }
.tema button { font: 700 .72rem/1.6 var(--font); letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
  border: 2px solid var(--ink); background: transparent; color: var(--ink); padding: .2rem .7rem; }
.tema button:last-child { border-left: 0; }
.tema button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
/* the code switch, beside Review and in its style; with the code off, no code and no notes about it */
.code-toggle { font: inherit; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 0;
  min-height: 44px; padding: 0 .8rem; cursor: pointer; }
.code-toggle[aria-pressed="true"] { border-color: var(--ink); }
html[data-code="off"] details.codice, html[data-code="off"] .nota.code, html[data-code="off"] details.foldcode,
html[data-code="off"] footer details.source { display: none; }

/* footer, with Munari's motto */
footer { font: 400 .9rem/1.5 var(--font); color: var(--muted); padding: 1rem 0 3rem; text-align: center;
  border-top: 2px solid var(--ink); }
body > footer { margin-top: 2rem; }
footer a { color: var(--ink); }
.motto { display: block; font: 700 1.35rem/1.3 var(--font); color: var(--ink); margin: .2rem 0 1rem; }
.motto span { display: block; font: 400 .74rem/2 var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--primary-text); }
details.source { margin-top: 1rem; text-align: left; }
details.source summary { cursor: pointer; }
details.source pre { overflow-x: auto; }   /* the whole source, top to bottom: it is opened on purpose */
/* a screenshot with numbered circles (nbScreenshot): the circle is a place */
.schermata { margin: 1rem 0; width: min(47%, 15rem); }
.schermata.wide { width: 100%; left: auto; transform: none; }   /* the screenshot of a wide page: the text's width */
.schermata > div { position: relative; }
.schermata img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.schermata .punto { position: absolute; transform: translate(-50%, -50%); width: 1.25rem; height: 1.25rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font: 700 .72rem/1 var(--font);
  background: var(--primary); color: var(--paper); box-shadow: 0 0 0 2px var(--paper); }
.schermata figcaption { font-size: .8rem; line-height: 1.35; color: var(--muted); margin-top: .3rem; }
html[data-tema="quaderno"] {
  --hand: "Patrick Hand", "Segoe Print", "Comic Sans MS", cursive;
  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pen: var(--primary); --pen-red: var(--red-pen);
}
html[data-tema="quaderno"] body { font: 17px/1.6 var(--font);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: var(--sq) var(--sq); }
html[data-tema="quaderno"] main { padding-left: 2.2rem; border-left: 3px double var(--margin); }
@media (max-width: 640px) { html[data-tema="quaderno"] main { padding-left: .9rem; } }
html[data-tema="quaderno"] header { padding-top: 0; }

/* the cover label */
html[data-tema="quaderno"] .etichetta { margin: 2.2rem auto 1.6rem; max-width: 30rem; background: var(--surface); min-height: auto;
  border: 2px solid var(--primary); border-radius: 18px; padding: 1rem 1.4rem 1.1rem;
  box-shadow: 4px 5px 0 color-mix(in srgb, var(--primary) 15%, transparent); }
html[data-tema="quaderno"] .etichetta::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--edge); border-radius: 13px; pointer-events: none; }
html[data-tema="quaderno"] .etichetta .riga { display: flex; gap: .6rem; align-items: baseline; border-bottom: 1.5px dotted var(--edge); padding: .15rem 0; }
html[data-tema="quaderno"] .etichetta .riga span:first-child { display: inline; font: 600 .72rem/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); min-width: 5.2rem; }
html[data-tema="quaderno"] .etichetta .riga span:last-child { font: 1.55rem/1.25 var(--hand); color: var(--primary); }
html[data-tema="quaderno"] .etichetta .nome span:last-child { font: 2.3rem/1.25 var(--hand); letter-spacing: normal; }
html[data-tema="quaderno"] .etichetta .riga:last-child:not(.nome) span:last-child { font-size: 1.55rem; letter-spacing: normal; text-transform: none; color: var(--primary); }
html[data-tema="quaderno"] .crumbs { font: 1.05rem var(--hand); letter-spacing: normal; text-transform: none; padding-top: .8rem; }
html[data-tema="quaderno"] .crumbs a { color: var(--primary); text-decoration-line: underline; }
html[data-tema="quaderno"] .lede { font-size: 1.15rem; line-height: inherit; }
html[data-tema="quaderno"] .kicker { font-weight: 600; letter-spacing: .14em; color: var(--red-pen); }

/* headings in blue pen, with a highlighter stroke */
html[data-tema="quaderno"] h1, html[data-tema="quaderno"] h2, html[data-tema="quaderno"] h3, html[data-tema="quaderno"] h4 { font-family: var(--hand); font-weight: 400; color: var(--primary); letter-spacing: normal; }
html[data-tema="quaderno"] h1 { font-size: 2.6rem; line-height: 1.15; }
html[data-tema="quaderno"] h2 { font-size: 2.05rem; margin: 2.6rem 0 .8rem -.3rem; display: inline-block; position: static; padding: 0 .3rem;
  background: linear-gradient(transparent 55%, var(--highlight) 55%, var(--highlight) 92%, transparent 92%); }
html[data-tema="quaderno"] h2::before { content: none; }
html[data-tema="quaderno"] h3 { font-size: 1.55rem; margin-top: 1.8rem; color: var(--red-pen); }
html[data-tema="quaderno"] h2 .num { color: var(--red-pen); }
html[data-tema="quaderno"] a { color: var(--primary); text-decoration-color: currentcolor; text-decoration-thickness: 1.5px; }
html[data-tema="quaderno"] a:hover { background: none; }
html[data-tema="quaderno"] blockquote { background: var(--postit); border-radius: 2px 2px 14px 2px; border-left: 0;
  box-shadow: 2px 3px 6px rgba(0,0,0,.08); transform: rotate(-.4deg); }
html[data-tema="quaderno"] hr { border-top: 2px dashed var(--edge); }
html[data-tema="quaderno"] mark { background: var(--highlight); }

/* code on index cards, outputs on sticky notes */
html[data-tema="quaderno"] pre > code, html[data-tema="quaderno"] pre.nb-output { border-radius: 6px; }
html[data-tema="quaderno"] pre > code { border: 1px solid var(--edge); border-left: 5px solid var(--primary);
  box-shadow: 2px 3px 0 color-mix(in srgb, var(--primary) 8%, transparent); }
html[data-tema="quaderno"] pre.nb-output { background: var(--postit); box-shadow: 2px 3px 6px rgba(0,0,0,.07); }
html[data-tema="quaderno"] pre.nb-output::before { font: .95rem var(--hand); letter-spacing: normal; text-transform: none; color: var(--muted); }
html[data-tema="quaderno"] :not(pre) > code { background: color-mix(in srgb, var(--primary) 7%, transparent); border-radius: 4px; }
html[data-tema="quaderno"] .hljs-string { color: var(--success-text); }
html[data-tema="quaderno"] .hljs-number, html[data-tema="quaderno"] .hljs-literal { color: var(--secondary-text); }
html[data-tema="quaderno"] .hljs-type { color: var(--primary); font-weight: inherit; } html[data-tema="quaderno"] .hljs-built_in { color: var(--secondary-text); }

/* tables pasted in, with a strip of tape, on squared paper */
html[data-tema="quaderno"] .tabella { padding: 18px 14px 12px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 3px 5px 14px rgba(0,0,0,.07); border-radius: 2px; }
html[data-tema="quaderno"] .tabella::before { content: ""; position: absolute; top: -11px; left: 50%; width: 110px; height: 24px;
  margin-left: -55px; background: var(--tape); transform: rotate(-2deg); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
html[data-tema="quaderno"] .tabella .tb_table { background-image: linear-gradient(var(--grid) 1px, transparent 1px),
  linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 12px 12px; }
html[data-tema="quaderno"] .tabella .tb_title { font-size: 150%; letter-spacing: normal; }
html[data-tema="quaderno"] main table:not(.tb_table) th, html[data-tema="quaderno"] main table:not(.tb_table) td { border-color: var(--edge); }

/* the indice: a sticky note with the headings */
html[data-tema="quaderno"] .indice { background: var(--postit); padding: 1rem 1.3rem 1.1rem; max-width: 34rem; border: 0;
  box-shadow: 2px 4px 10px rgba(0,0,0,.1); transform: rotate(.5deg); border-radius: 2px 2px 18px 2px; }
html[data-tema="quaderno"] .indice h2.indice-title { font: 400 1.7rem/1.15 var(--hand); letter-spacing: normal; text-transform: none; background: none;
  color: var(--red-pen); margin: 0 0 .4rem; }
html[data-tema="quaderno"] .indice > ol { list-style: decimal; padding-left: 1.5rem; counter-reset: none; font: 1.2rem/1.45 var(--hand); }
html[data-tema="quaderno"] .indice > ol > li { counter-increment: none; position: static; padding-left: 0; margin: 0; }
html[data-tema="quaderno"] .indice > ol > li::before { content: none; }
html[data-tema="quaderno"] .indice ol ol { font: 1.05rem/1.45 var(--hand); padding-left: 1.1rem; margin: 0; }
html[data-tema="quaderno"] .indice ol ol li::before { content: "– "; }
html[data-tema="quaderno"] .indice a { color: var(--primary); }

/* notes (nbNote): a sticky note, coloured by its kind; a warning carries the triangle */
html[data-tema="quaderno"] .nota { background: var(--postit); padding: .8rem 1.1rem; border-top: 0; border-radius: 2px 2px 14px 2px;
  box-shadow: 2px 3px 8px rgba(0,0,0,.09); transform: rotate(-.3deg); }
html[data-tema="quaderno"] .nota.info { background: var(--secondary-soft); } html[data-tema="quaderno"] .nota.done, html[data-tema="quaderno"] .nota.code { background: var(--success-soft); }
html[data-tema="quaderno"] .nota.missing { background: var(--primary-soft); } html[data-tema="quaderno"] .nota.warning { background: var(--warning-soft); }
html[data-tema="quaderno"] .nota .titolo { font: 1.3rem var(--hand); color: var(--red-pen); }
html[data-tema="quaderno"] .nota.warning { padding-left: 3rem; }
html[data-tema="quaderno"] .nota.warning::before, html[data-tema="quaderno"] .nota.warning::after { left: .9rem; top: .9rem; }
html[data-tema="quaderno"] .timbro { font: 1.05rem var(--hand); letter-spacing: normal; text-transform: none; color: var(--red-pen); border-color: var(--red-pen);
  border-radius: 8px; transform: rotate(-4deg); }
html[data-tema="quaderno"] .timbro.ok { color: var(--success-text); border-color: var(--success-text); }
html[data-tema="quaderno"] .nb-galleria > .nb-scheda { background: var(--surface); border: 1px solid var(--line); }
html[data-tema="quaderno"] .accanto .tabella { padding-left: 6px; padding-right: 6px; }

/* tabs and switches in blue pen */
html[data-tema="quaderno"] .lingue-tab button { font: 1rem var(--hand); letter-spacing: normal; text-transform: none; color: var(--primary);
  background: var(--surface); border: 1.5px solid var(--primary); border-bottom: 0; margin-right: -1.5px; }
html[data-tema="quaderno"] .lingue-tab button[aria-selected="true"] { background: var(--primary); color: var(--paper); }
html[data-tema="quaderno"] .lingue-pannello { border-top: 1.5px solid var(--primary); }
html[data-tema="quaderno"] details.codice { margin-top: -1rem; }
html[data-tema="quaderno"] details.codice > summary { font: 1rem var(--hand); letter-spacing: normal; text-transform: none; color: var(--primary); border-bottom: 0; }

/* specs */
html[data-tema="quaderno"] details.spec { background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; }
html[data-tema="quaderno"] details.spec > summary b { font: 1.45rem var(--hand); color: var(--primary); }
html[data-tema="quaderno"] .req h4 { font: 1.3rem var(--hand); color: var(--red-pen); }
html[data-tema="quaderno"] .ex-out summary { font: 1.05rem var(--hand); }
html[data-tema="quaderno"] .scen { background: var(--shade); border-radius: 8px; }
html[data-tema="quaderno"] .scen-name { font: 1.1rem var(--hand); color: var(--primary); }

/* the look switch */
html[data-tema="quaderno"] .tema button { font: 1rem var(--hand); letter-spacing: normal; text-transform: none; color: var(--primary);
  background: var(--surface); border: 1.5px solid var(--primary); padding: .1rem .7rem; }
html[data-tema="quaderno"] .tema button:first-child { border-radius: 10px 0 0 10px; } html[data-tema="quaderno"] .tema button:last-child { border-radius: 0 10px 10px 0; border-left: 0; }
html[data-tema="quaderno"] .tema button[aria-pressed="true"] { background: var(--primary); color: var(--paper); }
html[data-tema="quaderno"] .forme, html[data-tema="quaderno"] .motto { display: none; }

html[data-tema="quaderno"] footer { font: 1.05rem var(--hand); border-top: 0; }
html[data-tema="quaderno"] body > footer { margin-top: 0; }
html[data-tema="quaderno"] footer a { color: var(--primary); }
html[data-tema="minoan"] {
  --font: "Gentium Book Plus", "Gentium Plus", Georgia, "Times New Roman", serif;
  --hand: var(--font);
  --meander: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath d='M0 1.5H24M0 22.5H24M2 19V5H18V15H8V10H13' fill='none' stroke='black' stroke-width='2.4'/%3E%3C/svg%3E");
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 14' width='20' height='14'%3E%3Cpath d='M0 12C4 12 3 2 10 2C16 2 16 9 12 9C9 9 9 6 11 6M10 12H20' fill='none' stroke='black' stroke-width='1.8'/%3E%3C/svg%3E");
}
html[data-tema="minoan"] body { font: 19px/1.6 var(--font); font-variant-numeric: oldstyle-nums proportional-nums; }

/* the masthead: the wordmark in spaced capitals, then a running wave in dolphin blue instead of Munari's shapes */
html[data-tema="minoan"] .forme { display: none; }
html[data-tema="minoan"] .etichetta { padding-right: 0; min-height: 0; margin: 2rem 0 1.6rem; padding-bottom: 1.6rem; }
html[data-tema="minoan"] .etichetta::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px; background: var(--secondary);
  -webkit-mask: var(--wave) repeat-x left center / auto 14px; mask: var(--wave) repeat-x left center / auto 14px; }
html[data-tema="minoan"] .etichetta .nome span:last-child { font: 700 2.7rem/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
html[data-tema="minoan"] .etichetta .riga:last-child:not(.nome) span:last-child { font-variant: small-caps; text-transform: lowercase; letter-spacing: .12em; color: var(--primary-text); }
html[data-tema="minoan"] .kicker { font: 400 .95rem/1.2 var(--font); font-variant: small-caps; text-transform: lowercase; letter-spacing: .14em; color: var(--primary-text); }
html[data-tema="minoan"] .lede { font-style: italic; font-size: 1.25rem; }

/* headings: the serif, bold, a little open; the section circle is a terracotta disc ringed in black glaze */
html[data-tema="minoan"] h1, html[data-tema="minoan"] h2, html[data-tema="minoan"] h3, html[data-tema="minoan"] h4 { font-family: var(--font); letter-spacing: .005em; }
html[data-tema="minoan"] h1 { font-size: 2.6rem; line-height: 1.08; }
html[data-tema="minoan"] h2 { font-size: 1.75rem; }
html[data-tema="minoan"] h2::before { box-shadow: inset 0 0 0 2.5px var(--ink); }
html[data-tema="minoan"] h3 { font-style: italic; font-weight: 400; font-size: 1.35rem; color: var(--primary-text); }
html[data-tema="minoan"] a { text-decoration-color: var(--primary); text-decoration-thickness: 1.5px; text-underline-offset: .15em; }
html[data-tema="minoan"] blockquote { border-left: 3px solid var(--primary); font-style: italic; }

/* tables: a running wave in dolphin blue as the rule above, lining figures that line up */
html[data-tema="minoan"] .tabella:not(#_) { padding-top: 26px; }  /* :not(#_) to win over the table's own stylesheet */
html[data-tema="minoan"] .tabella::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 12px; background: var(--secondary);
  -webkit-mask: var(--wave) repeat-x left center / auto 12px; mask: var(--wave) repeat-x left center / auto 12px; }
html[data-tema="minoan"] .tabella table { font-variant-numeric: lining-nums tabular-nums; }
html[data-tema="minoan"] .tabella .tb_title { font-family: var(--font); font-size: 135%; letter-spacing: .01em; }
html[data-tema="minoan"] .tabella .tb_subtitle { font-style: italic; }

/* the indice: numbers in terracotta discs, the headings in the serif */
html[data-tema="minoan"] .indice h2.indice-title { font: 400 1rem/1 var(--font); font-variant: small-caps; text-transform: lowercase; letter-spacing: .16em; }
html[data-tema="minoan"] .indice > ol > li::before { box-shadow: inset 0 0 0 2px var(--ink); font-variant-numeric: lining-nums; }

/* notes and cards: plaster panels, their straight top edge in the role's colour */
html[data-tema="minoan"] .nota { background: color-mix(in oklab, var(--surface) 60%, var(--paper)); }
html[data-tema="minoan"] .nota .titolo { font-variant: small-caps; text-transform: lowercase; letter-spacing: .08em; }
html[data-tema="minoan"] .nb-galleria > .nb-scheda { background: color-mix(in oklab, var(--surface) 60%, var(--paper)); }

/* code stays in the monospace, smaller; outputs on plaster */
html[data-tema="minoan"] pre > code, html[data-tema="minoan"] pre.nb-output { font-variant-numeric: normal; }

/* the look switch, in small capitals */
html[data-tema="minoan"] .tema button { font-family: var(--font); font-variant: small-caps; text-transform: lowercase; letter-spacing: .1em; font-weight: 700; }

/* the footer: a meander above it, in black glaze */
html[data-tema="minoan"] body > footer { padding-top: 2.4rem; }
html[data-tema="minoan"] body > footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 14px; background: var(--ink);
  -webkit-mask: var(--meander) repeat-x left center / auto 14px; mask: var(--meander) repeat-x left center / auto 14px; }
html[data-tema="minoan"] .motto { font-style: italic; }
/* the colours and fonts the review mode uses, for a page that has none of its own (a plain nimib
   page): `:where` weighs nothing, so a page's own tokens (tabelline's, on :root) win */
:where(html) { --paper: #fffdf8; --ink: #1f1f1f; --surface: #f6f3ec; --line: #c9c4ba; --shade: #e7e2d8;
  --muted: #6b675f; --secondary: #6aa9d6; --secondary-soft: #d6e8f5; --primary-text: #8a3550;
  --neutral-1: #ece8df; --font: system-ui, sans-serif; --mono: ui-monospace, monospace; }
/* the review mode (review.nim, nbReview): a Review button, then marks on the text, a bar at
   the bottom, the comment's sheet at the top, export and history */
.rv-only { display: none; }
body.rv-on .rv-only { display: block; }
.rv-bar[hidden], .rv-panel[hidden] { display: none; }
.rv-enter { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin: .8rem 0 1.4rem; color: var(--muted); font-size: .92rem; }
.rv-enter .rv-version { font-weight: 700; color: var(--ink); }
.rv-toggle { font: inherit; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 0;
  min-height: 44px; padding: 0 .8rem; cursor: pointer; }
.rv-toggle[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--secondary); }
body.rv-on { padding-bottom: calc(4.6rem + env(safe-area-inset-bottom, 0px)); }
mark.rv-mark { background: var(--secondary-soft); color: inherit; box-shadow: 0 2px 0 var(--secondary); cursor: pointer; }
mark.rv-mark.rv-current { background: var(--secondary); }
.rv-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; gap: .3rem;
  justify-content: center; padding: .45rem max(.5rem, env(safe-area-inset-right, 0px)) calc(.45rem + env(safe-area-inset-bottom, 0px)) max(.5rem, env(safe-area-inset-left, 0px));
  background: var(--surface); border-top: 3px solid var(--ink); font: 400 15px/1.2 var(--font); }
.rv-bar button, .rv-sheet button { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line);
  border-radius: 0; min-height: 44px; min-width: 44px; padding: 0 .7rem; cursor: pointer; white-space: nowrap; }
.rv-bar button { padding: 0 .55rem; }
.rv-bar button[data-do="delete"] { color: var(--primary-text); }
.rv-bar button:disabled { color: var(--muted); border-color: var(--shade); cursor: default; }
.rv-bar button[data-do="prev"], .rv-bar button[data-do="next"] { font-size: 1.4rem; padding: 0; }
.rv-bar .rv-count { min-width: 3.2rem; text-align: center; color: var(--muted); font-size: .85rem; }
.rv-bar .rv-add, .rv-sheet .rv-save { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 700; }
.rv-bar .rv-add.rv-selected { background: var(--secondary); color: var(--ink); border-color: var(--ink); }
dialog.rv-sheet { width: 100%; max-width: 40rem; margin: 0 auto auto; padding: 1rem max(1rem, env(safe-area-inset-right, 0px)) 1rem max(1rem, env(safe-area-inset-left, 0px));
  border: 0; border-bottom: 3px solid var(--ink); background: var(--surface); color: var(--ink); font: 400 16px/1.45 var(--font);
  max-height: 90vh; overflow-y: auto; }
dialog.rv-sheet::backdrop { background: color-mix(in oklab, var(--ink) 30%, transparent); }
.rv-sheet .rv-where { margin: 0 0 .4rem; font-weight: 700; }
.rv-sheet textarea { display: block; width: 100%; margin-top: .2rem; font: 16px/1.4 var(--font); color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 0; padding: .5rem; }
.rv-export textarea { font: 16px/1.45 var(--mono); white-space: pre-wrap; }   /* 16px: a phone zooms on smaller fields */
.rv-sheet .rv-actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.rv-sheet .rv-left { margin-right: auto; }
.rv-sheet .rv-danger { color: var(--primary-text); }
/* the comment's sheet: at the top, small, not modal: the bar and the page stay in reach */
.rv-panel { position: fixed; top: 0; left: 0; right: 0; z-index: 60; max-width: 40rem; margin: 0 auto;
  padding: .5rem max(.6rem, env(safe-area-inset-right, 0px)) .6rem max(.6rem, env(safe-area-inset-left, 0px));
  background: var(--surface); border-bottom: 3px solid var(--ink); color: var(--ink); font: 400 16px/1.45 var(--font);
  animation: rv-down .2s ease-out; }
.rv-panel .rv-whole { margin: 0 0 .3rem; color: var(--muted); font-size: .85rem; }
.rv-panel .rv-note { margin: 0; }
.rv-panel .rv-thumbs { margin-top: .45rem; }
.rv-panel button { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 0; cursor: pointer; }
/* history: one line per version */
.rv-versions { list-style: none; margin: 0 0 .8rem; padding: 0; }
.rv-versions li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; min-height: 48px; padding: .3rem 0; border-bottom: 1px solid var(--shade); }
.rv-versions .rv-old { display: flex; gap: .4rem; }
.rv-versions .rv-old[hidden] { display: none; }
.rv-versions a { color: var(--ink); }
.rv-versions .rv-date { flex: 1; color: var(--muted); font-size: .9rem; }
.rv-versions .rv-n { font-size: .85rem; }
/* a screenshot, as large as the screen allows */
dialog.rv-zoom { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0; border: 0; background: transparent; }
dialog.rv-zoom[open] { display: flex; align-items: center; justify-content: center; }
dialog.rv-zoom::backdrop { background: color-mix(in oklab, var(--ink) 88%, transparent); }
dialog.rv-zoom img { max-width: 100%; max-height: 100%; object-fit: contain; }
dialog.rv-zoom button { position: fixed; top: max(.5rem, env(safe-area-inset-top, 0px)); right: .5rem; min-width: 44px; min-height: 44px;
  font-size: 1.5rem; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 0; }
.rv-thumb img, .rv-shot img { cursor: zoom-in; }
dialog.rv-sheet[open] { animation: rv-down .2s ease-out; }
@keyframes rv-down { from { transform: translateY(-100%); } }
/* the note: an editable box, so a phone offers to paste a screenshot in it */
.rv-note { min-height: 3.2rem; max-height: 9rem; overflow-y: auto; padding: .5rem; font: 16px/1.4 var(--font);
  background: var(--paper); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.rv-note:empty::before { content: attr(data-placeholder); color: var(--muted); }
.rv-note:focus { outline: 2px solid var(--secondary); outline-offset: -1px; }
.rv-thumbs { display: flex; flex-wrap: wrap; gap: .5rem; }
.rv-thumb { position: relative; }
.rv-thumb img { display: block; height: 4.5rem; width: auto; border: 1px solid var(--line); }
.rv-thumb button { position: absolute; top: 0; right: 0; min-height: 32px; min-width: 32px; padding: 0; font-size: 1.1rem; }
/* the export: each screenshot with its own Copy */
.rv-shotlist { display: flex; flex-direction: column; gap: .35rem; margin: 0 0 .6rem; }
.rv-shot { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--muted); }
.rv-shot img { height: 2.75rem; width: auto; border: 1px solid var(--line); }
.rv-shot span { flex: 1; overflow-wrap: anywhere; }
html[data-tema="quaderno"] mark.rv-mark { background: var(--highlight); box-shadow: 0 2px 0 var(--red-pen); }
html[data-tema="quaderno"] mark.rv-mark.rv-current { background: var(--postit); box-shadow: 0 2px 0 var(--red-pen), 0 0 0 2px var(--red-pen); }
html[data-tema="quaderno"] .rv-bar { font-family: var(--font); }
