/* xted site. Tokens first; see DESIGN.md. */
@font-face { font-family: "Martian Mono"; src: url("../fonts/martian-mono.woff2") format("woff2"); font-weight: 100 800; font-stretch: 75% 112.5%; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("../fonts/atkinson-next.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("../fonts/atkinson-next-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "xted symbols"; src: url("../fonts/xted-symbols.woff2") format("woff2"); font-display: swap; unicode-range: U+2190-2193, U+21B5, U+2423, U+2500-259F, U+25A0-25FF, U+2610-2611, U+2713; }

:root {
  --carta: #E8ECF1; --foglio: #F6F8FA; --inchiostro: #15233A; --terminale: #0F1A2C;
  --cursore: #FFC83D; --grigio: #4A5A72; --filo: #C5CEDA; --scelta: #DCE2EA;
  --aggiunta: #1D6B5D; --tolta: #A52F3D; --aggiunta-segno: #2F9E8A; --tolta-segno: #C8414F;
  --aggiunta-scura: #6FD3BF; --tolta-scura: #FF9AA4;
  --chiaro: #E3E9F2; --fioco: #A9B8CF; --filo-scuro: #2C3D5C;
  --mono: "xted symbols", "Martian Mono", ui-monospace, monospace;
  --testo: "Atkinson Next", "xted symbols", system-ui, sans-serif;
  --riga: 1.55rem; --margine: clamp(1rem, 4vw, 2.5rem); --pagina: 75rem; --barra: 3rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 109.375%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--barra) + 1rem); }
body { margin: 0; background: var(--carta); color: var(--inchiostro); font-family: var(--testo); line-height: 1.55; overflow-wrap: break-word; }
img, video { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }

h1, h2, h3, h4 { font-family: var(--mono); font-stretch: 80%; font-weight: 650; line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 1.1rem + 2.8vw, 3.052rem); letter-spacing: -0.02em; line-height: 1.12; }
h2 { font-size: clamp(1.4rem, 1.2rem + 0.9vw, 1.953rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
p, ul, ol, dl, pre, figure { margin: 0 0 var(--riga); }
li { margin-bottom: .3rem; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 3px; text-decoration-color: var(--aggiunta-segno); }
::selection { background: var(--cursore); color: var(--inchiostro); }

/* the focus is the cursor: amber behind ink */
:focus-visible { outline: 2px solid var(--inchiostro); outline-offset: 2px; box-shadow: 0 0 0 6px var(--cursore); }
a:focus-visible, summary:focus-visible, button:focus-visible { background: var(--cursore); color: var(--inchiostro); }
main:focus { outline: none; box-shadow: none; }

code, kbd, pre { font-family: var(--mono); font-stretch: 87.5%; font-variant-ligatures: none; }
code { font-size: .82em; background: var(--scelta); padding: .08em .3em; border-radius: 2px; overflow-wrap: anywhere; }
kbd { display: inline-block; font-size: .74em; font-weight: 500; line-height: 1.5; padding: 0 .4em; border: 1px solid var(--grigio); border-bottom-width: 2px; border-radius: 3px; background: var(--foglio); color: var(--inchiostro); white-space: nowrap; }
.tasti { white-space: nowrap; }
.cmd { font-weight: 700; }

.salta { position: absolute; left: .5rem; top: -4rem; z-index: 30; background: var(--cursore); color: var(--inchiostro); padding: .4rem .8rem; }
.salta:focus { top: .5rem; }

/* ---- menu bar ---------------------------------------------------------- */
.barra { position: sticky; top: 0; z-index: 20; display: flex; align-items: stretch; min-height: var(--barra); padding: 0 var(--margine); background: var(--inchiostro); color: var(--carta); font-family: var(--mono); font-stretch: 85%; font-size: .8rem; }
.barra a, .menu-mobile summary { color: var(--carta); text-decoration: none; display: flex; align-items: center; padding: 0 .9rem; }
.barra a:hover, .menu-mobile summary:hover { background: var(--filo-scuro); }
.barra a[aria-current], .menu-mobile[open] summary { background: var(--cursore); color: var(--inchiostro); }
.barra a:focus-visible, .menu-mobile summary:focus-visible { background: var(--cursore); color: var(--inchiostro); outline-offset: -3px; box-shadow: none; }
.barra .marchio { font-weight: 750; gap: .5rem; padding-left: 0; margin-right: .6rem; }
.barra .marchio:focus-visible { padding-left: .4rem; }
.menu ul { display: flex; margin: 0; padding: 0; list-style: none; height: 100%; }
.menu li { display: flex; margin: 0; }
.barra .pulsante-barra { margin-left: auto; }
.lingua { display: flex; margin-left: .4rem; border-left: 1px solid var(--filo-scuro); padding-left: .4rem; }
.lingua a { padding: 0 .55rem; min-width: 2.4rem; justify-content: center; }
abbr { text-decoration: none; }
.menu-mobile { display: none; }
@media (max-width: 52rem) { .barra .pulsante-barra { display: none; } .lingua { margin-left: auto; } }
@media (max-width: 40rem) {
  .menu { display: none; }
  .menu-mobile { display: flex; }
  .menu-mobile summary { cursor: pointer; height: 100%; list-style: none; gap: .4rem; }
  .menu-mobile summary::after { content: "▾"; }
  .menu-mobile summary::-webkit-details-marker { display: none; }
  .menu-mobile nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--inchiostro); border-top: 1px solid var(--filo-scuro); }
  .menu-mobile ul { list-style: none; margin: 0; padding: .3rem 0; }
  .menu-mobile li { margin: 0; }
  .menu-mobile nav a { padding: .75rem var(--margine); }
}

/* ---- status bar and key bar --------------------------------------------- */
.piede { margin-top: calc(var(--riga) * 4); background: var(--inchiostro); color: var(--carta); font-family: var(--mono); font-stretch: 85%; font-size: .75rem; }
.piede .stato { display: flex; flex-wrap: wrap; gap: .3rem 2ch; margin: 0; padding: .8rem var(--margine); background: var(--filo-scuro); }
.barra-tasti ul { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: .8rem var(--margine) 1.2rem; }
.barra-tasti li { margin: 0; }
.barra-tasti a { display: flex; align-items: center; gap: .5ch; padding: .4rem .7rem .4rem .4rem; text-decoration: none; min-height: 2.4rem; }
.barra-tasti a:hover { background: var(--filo-scuro); }
.barra-tasti kbd { font-size: .95em; background: var(--carta); border-color: var(--fioco); }
.piede :focus-visible { box-shadow: none; outline-color: var(--cursore); }

/* ---- page frame ---------------------------------------------------------- */
main { display: block; max-width: calc(var(--pagina) + 2 * var(--margine)); margin: 0 auto; padding: calc(var(--riga) * 2) var(--margine) 0; }
.testo > p, .testo > ul, .testo > ol, .misura { max-width: 68ch; }
.sommario { font-size: 1.15rem; max-width: 60ch; }
.testa h1, .testo > h1, .stretta > h1 { margin-bottom: var(--riga); }

/* ---- buttons and commands ------------------------------------------------ */
.azioni { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: var(--riga); }
.bottone { font-family: var(--mono); font-stretch: 87.5%; font-size: .85rem; font-weight: 600; text-decoration: none; padding: .75rem 1.2rem; border: 2px solid var(--inchiostro); border-radius: 3px; }
.bottone.primo { background: var(--inchiostro); color: var(--carta); }
.bottone:hover { background: var(--cursore); color: var(--inchiostro); }
.comando { position: relative; display: flex; align-items: stretch; background: var(--terminale); border-radius: 4px; margin: 0 0 var(--riga); min-width: 0; }
pre { background: var(--terminale); color: var(--chiaro); font-size: .76rem; font-weight: 350; line-height: 1.75; padding: .9rem 1.1rem; border-radius: 4px; overflow-x: auto; max-width: 100%; tab-size: 4; }
pre code { background: none; padding: 0; font-size: 1em; font-stretch: inherit; overflow-wrap: normal; border-radius: 0; }
pre .c { color: var(--fioco); }
.comando pre { margin: 0; flex: 1; min-width: 0; }
.comando pre.shell code::before { content: "$ "; color: var(--aggiunta-scura); user-select: none; }
.comando pre.ps code::before { content: "PS> "; color: var(--aggiunta-scura); user-select: none; }
.comando pre.copiabile { white-space: pre-wrap; }
.comando pre.copiabile code { overflow-wrap: break-word; }
.hero-fatti .comando pre { font-size: .72rem; }
/* the room of the button is kept before the script adds it, so nothing moves */
.comando pre.copiabile:last-child { margin-right: 6rem; }
.copia { flex: none; width: 5.4rem; align-self: center; margin-right: .6rem; font: 600 .72rem var(--mono); font-stretch: 87.5%; background: var(--carta); color: var(--inchiostro); border: 0; border-radius: 3px; padding: .5rem 0; cursor: pointer; }
.copia:hover { background: var(--cursore); }

/* ---- terminal frames ------------------------------------------------------ */
.terminale { margin: 0 0 calc(var(--riga) * 1.5); min-width: 0; }
.terminale .scheda { background: var(--inchiostro); border-radius: 6px 6px 0 0; padding: .35rem .5rem 0; display: flex; font: 500 .68rem var(--mono); font-stretch: 85%; }
.terminale .scheda span { background: var(--terminale); color: var(--chiaro); padding: .3rem .8rem; border-radius: 3px 3px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.terminale video, .terminale img, .vuoto { width: 100%; background: var(--terminale); border-radius: 0 0 6px 6px; }
.vuoto { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .5rem; color: var(--chiaro); font-family: var(--mono); font-stretch: 85%; text-align: center; padding: .5rem; overflow: hidden; }
.vuoto-nome { font-size: clamp(.85rem, 2.2vw, 1.25rem); font-weight: 600; overflow-wrap: anywhere; }
.vuoto-nota { font-size: .68rem; color: var(--fioco); }
figcaption { font-size: .9rem; color: var(--grigio); padding-top: .6rem; max-width: 68ch; }
.poster-fermo { display: none; }
@media (prefers-reduced-motion: reduce) { [data-media="hero"] video { display: none; } .poster-fermo { display: block; } }

/* ---- tables ---------------------------------------------------------------- */
.scorri { overflow-x: auto; margin: 0 0 var(--riga); max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; background: var(--foglio); }
caption { text-align: left; font-weight: 700; padding: 0 0 .5rem; }
th, td { text-align: left; vertical-align: top; padding: .55rem .75rem; border-bottom: 1px solid var(--filo); }
thead th { font-family: var(--mono); font-stretch: 85%; font-size: .72rem; font-weight: 600; background: var(--scelta); }
.scorri table { min-width: 34rem; }
.num { white-space: nowrap; text-align: right; }
.download th[scope="row"] { font-weight: 400; min-width: 17rem; }
.download th[scope="row"] a { font-family: var(--mono); font-stretch: 80%; font-size: .78rem; font-weight: 600; overflow-wrap: anywhere; }
.sha { display: block; font-size: .72rem; color: var(--grigio); margin-top: .25rem; max-width: 24rem; }
.sha code { background: none; padding: 0; font-size: .85em; }
.download { min-width: 52rem !important; }
@media (max-width: 52rem) {
  .download { min-width: 0 !important; }
  .download, .download caption, .download tbody, .download tbody tr, .download tbody th, .download tbody td { display: block; }
  .download thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .download caption { padding-inline: .75rem; }
  .download tbody tr { padding: .7rem .75rem; border-bottom: 1px solid var(--filo); }
  .download tbody th, .download tbody td { padding: .1rem 0; border: 0; min-width: 0; text-align: left; }
  .download td[data-label]::before { content: attr(data-label) ": "; color: var(--grigio); }
}

/* ---- home ------------------------------------------------------------------ */
.hero-testa { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--riga) 3rem; align-items: center; margin-bottom: calc(var(--riga) * 1.5); }
.hero-testa > * { min-width: 0; }
.hero-testa h1 { margin-bottom: .2rem; font-size: clamp(1.75rem, 1.1rem + 2.5vw, 2.75rem); font-stretch: 75%; }
.cursore { display: inline-block; width: .55em; height: .95em; margin-left: .12em; vertical-align: -.1em; background: var(--cursore); box-shadow: 0 0 0 1px var(--inchiostro); animation: lampeggio 1s steps(1) 5; }
@keyframes lampeggio { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursore { animation: none; } }
.hero-fatti .comando { margin: 0; }
.blocco { margin-top: calc(var(--riga) * 4); }
.blocco > h2 { margin-bottom: calc(var(--riga) * 1.5); max-width: 32ch; }
.riga-funzione { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1rem 3rem; align-items: center; margin-bottom: calc(var(--riga) * 2); }
.riga-funzione > * { min-width: 0; margin-bottom: 0; }
.riga-funzione:nth-of-type(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.riga-funzione:nth-of-type(even) > .racconto { order: 2; }
/* a large recording needs the whole width to be read: text above, recording below */
.riga-funzione.larga { grid-template-columns: minmax(0, 1fr); }
.riga-funzione.larga > .racconto { order: 0; max-width: 68ch; }
.racconto h3 { margin-bottom: .75rem; }
.racconto p:last-child { margin: 0; }
.coppie { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; margin-top: calc(var(--riga) * 3); }
.coppie > div { border-top: 3px solid var(--inchiostro); padding-top: var(--riga); margin-bottom: var(--riga); }
.coppie h3 { margin-bottom: .75rem; }
.galleria { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.galleria > .grande { grid-column: 1 / -1; }
.galleria figcaption { font-size: .82rem; }
.galleria > .terminale .vuoto-nome { font-size: .8rem; }
.due { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; }
.due > div { min-width: 0; }
.due h3 { margin-bottom: .75rem; }
@media (max-width: 52rem) {
  .hero-testa, .riga-funzione, .riga-funzione:nth-of-type(even), .due { grid-template-columns: minmax(0, 1fr); }
  .riga-funzione:nth-of-type(even) > .racconto { order: 0; }
}
@media (max-width: 34rem) { .coppie, .galleria { grid-template-columns: minmax(0, 1fr); } }

/* ---- features: the file browser -------------------------------------------- */
.con-albero { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 3rem; align-items: start; }
.albero { position: sticky; top: calc(var(--barra) + 1rem); max-height: calc(100vh - var(--barra) - 2rem); overflow-y: auto; background: var(--foglio); border-right: 3px solid var(--filo); padding: .6rem 0 1rem; font: 400 .7rem/1.5 var(--mono); font-stretch: 80%; scrollbar-width: thin; }
.albero ul, .albero-mobile ul { list-style: none; margin: 0; padding: 0; }
.albero li, .albero-mobile li { margin: 0; }
.albero a, .albero-mobile a { display: block; text-decoration: none; padding: .24rem .7rem .24rem 2.2rem; text-indent: -1.2rem; }
.cartella > a { font-weight: 700; }
.cartella > a::before { content: "▾ "; }
.file > a::before { content: "\00a0\00a0"; white-space: pre; }
.cartella ul a { padding-left: 3.4rem; }
.albero a:hover, .albero-mobile a:hover { background: var(--scelta); }
.albero a[aria-current] { background: var(--cursore); color: var(--inchiostro); }
.albero :focus-visible { outline-offset: -3px; box-shadow: none; }
.albero-titolo { font-weight: 700; margin: 0 0 .3rem; padding: 0 .7rem .4rem; border-bottom: 1px solid var(--filo); }
.albero-mobile { display: none; }
.corpo { min-width: 0; }
.corpo section { margin-top: calc(var(--riga) * 3); }
.corpo h2 { border-bottom: 3px solid var(--inchiostro); padding-bottom: .5rem; margin-bottom: var(--riga); }
.corpo h3 { margin: calc(var(--riga) * 1.75) 0 .75rem; }
.corpo h4 { margin: var(--riga) 0 .5rem; }
.corpo > .testa p, .corpo section > p, .corpo section > ul, .corpo section > ol, .corpo section > dl { max-width: 68ch; }
.corpo .terminale.piccolo { max-width: 48rem; }
dl.voci dt { font-weight: 700; }
dl.voci dd { margin: 0 0 .7rem; padding-left: 1.2rem; border-left: 3px solid var(--filo); }
.elenco-fitto { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; max-width: 68ch; }
.elenco-fitto li { margin: 0; font: 400 .72rem var(--mono); font-stretch: 85%; background: var(--foglio); border: 1px solid var(--filo); border-radius: 3px; padding: .2rem .55rem; }
.nota { border-left: 6px solid var(--cursore); padding-left: 1rem; max-width: 68ch; }
.campioni i { display: inline-block; width: 1.6rem; height: .9rem; border: 1px solid var(--grigio); vertical-align: -.1rem; margin-right: .5rem; }
@media (max-width: 60rem) {
  .con-albero { display: block; }
  .albero { display: none; }
  .albero-mobile { display: block; background: var(--foglio); border: 1px solid var(--filo); border-radius: 4px; font: 400 .75rem var(--mono); font-stretch: 80%; margin-bottom: var(--riga); }
  .albero-mobile summary { padding: .8rem 1rem; font-weight: 700; cursor: pointer; }
  .albero-mobile a { padding-top: .5rem; padding-bottom: .5rem; }
}

/* ---- commands: the palette -------------------------------------------------- */
.gruppi ul { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; }
.gruppi li { margin: 0; }
.gruppi a { display: block; font: 500 .72rem var(--mono); font-stretch: 85%; text-decoration: none; border: 1px solid var(--grigio); border-radius: 3px; padding: .35rem .65rem; }
.gruppi a:hover { background: var(--cursore); }
.palette { background: var(--foglio); border: 2px solid var(--inchiostro); border-radius: 6px; margin-bottom: var(--riga); }
.palette-testa { position: sticky; top: var(--barra); z-index: 5; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; justify-content: space-between; background: var(--inchiostro); color: var(--carta); padding: .6rem 1rem; font-family: var(--mono); font-stretch: 85%; font-size: .78rem; }
.palette-testa p { margin: 0; }
.palette-titolo { font-weight: 700; }
.palette-titolo .tasti { margin-left: .6rem; }
.filtro { display: flex; align-items: center; gap: .6rem; flex: 0 1 24rem; }
.filtro input { flex: 1; min-width: 0; font: inherit; padding: .45rem .6rem; border: 0; border-radius: 3px; background: var(--carta); color: var(--inchiostro); caret-shape: block; }
.legenda, .conta { padding: .7rem 1rem 0; margin: 0; font-size: .88rem; color: var(--grigio); }
.conta:empty { padding: 0; }
.gruppo h2 { font-size: 1rem; background: var(--scelta); padding: .6rem .75rem; margin-top: 1rem; scroll-margin-top: 4rem; }
.gruppo table { table-layout: fixed; }
.gruppo thead th { background: none; color: var(--grigio); border-bottom: 1px solid var(--grigio); }
.gruppo thead th:nth-child(1) { width: 27%; }
.gruppo thead th:nth-child(2) { width: 22%; }
.gruppo thead th:nth-child(4) { width: 19%; }
.gruppo tbody th { font-weight: 700; }
.gruppo tbody tr:hover, .gruppo tbody tr:target { background: var(--scelta); }
.gruppo tbody tr:target th { box-shadow: inset 6px 0 0 var(--cursore); }
.gruppo .k kbd { font-size: .68rem; }
.gruppo .k { line-height: 2; }
.gruppo .id code { background: none; padding: 0; color: var(--grigio); font-size: .72rem; }
.o, .nessuno { font-size: .8rem; color: var(--grigio); }
.valore { margin-left: .5rem; }
.valore.testo { font: 400 .68rem var(--mono); font-stretch: 85%; color: var(--grigio); }
.segno.on, .valore.on { color: var(--aggiunta); }
.solo-lettori { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 52rem) {
  .palette-testa { position: static; }
  .gruppo table, .gruppo tbody, .gruppo tbody tr, .gruppo tbody th, .gruppo tbody td { display: block; width: auto; }
  .gruppo thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .gruppo tbody tr { padding: .7rem .75rem; border-bottom: 1px solid var(--filo); }
  .gruppo tbody th, .gruppo tbody td { padding: .1rem 0; border: 0; }
}
.chiavi th[scope="row"] { font-weight: 400; white-space: nowrap; }

/* ---- install --------------------------------------------------------------- */
.passi { list-style: none; counter-reset: passo; padding: 0; }
.passi > li { counter-increment: passo; position: relative; padding-left: 3.5rem; margin-bottom: calc(var(--riga) * 1.5); min-width: 0; }
.passi > li::before { content: counter(passo); position: absolute; left: 0; top: 0; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; background: var(--inchiostro); color: var(--carta); font: 700 .85rem var(--mono); border-radius: 3px; }
.passi h3 { padding-top: .35rem; margin-bottom: .75rem; }
.passi p, .passi ul { max-width: 68ch; }
.pagina-install section { margin-top: calc(var(--riga) * 3); }
.pagina-install h2 { border-bottom: 3px solid var(--inchiostro); padding-bottom: .5rem; margin-bottom: var(--riga); }
.pagina-install h3, .pagina-commands .testo h3 { margin: var(--riga) 0 .75rem; }
.pagina-install .stretta { max-width: 54rem; }
.pagina-commands .testo section { margin-top: calc(var(--riga) * 3); }
.pagina-commands .testo section > h2 { border-bottom: 3px solid var(--inchiostro); padding-bottom: .5rem; margin-bottom: var(--riga); }
@media (max-width: 34rem) { .passi > li { padding-left: 0; } .passi > li::before { width: 1.8rem; height: 1.8rem; top: .2rem; } .passi h3 { padding-left: 2.6rem; min-height: 2.2rem; } }

/* ---- start screen and 404 ---------------------------------------------------- */
.avvio { min-height: 100vh; display: grid; place-items: center; background: var(--terminale); color: var(--chiaro); font-family: var(--mono); font-stretch: 87.5%; text-align: center; }
.avvio main { padding: 2rem 1rem; }
.avvio img { margin: 0 auto 1rem; }
.avvio h1 { font-size: 3rem; }
.avvio-versione { margin: .5rem 0 0; }
.avvio-crediti { color: var(--fioco); font-size: .75rem; }
.avvio-tasti { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.avvio-tasti a { display: flex; align-items: center; gap: .8ch; text-decoration: none; border: 1px solid var(--fioco); border-radius: 4px; padding: .8rem 1.2rem .8rem .8rem; font-size: .9rem; }
.avvio-tasti a:hover { background: var(--filo-scuro); }
.avvio :focus-visible { outline-color: var(--cursore); box-shadow: none; }
.errore { min-height: 100vh; display: flex; flex-direction: column; }
.errore main { flex: 1; width: 100%; position: relative; padding-left: calc(var(--margine) + 3ch); }
.errore .righe { position: absolute; left: var(--margine); top: calc(var(--riga) * 2); display: flex; flex-direction: column; gap: 1rem; font-family: var(--mono); color: var(--grigio); }
.errore h1 { margin-bottom: var(--riga); }
.messaggi { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; background: var(--inchiostro); color: var(--carta); font: 500 .78rem var(--mono); font-stretch: 85%; padding: .8rem var(--margine); margin-top: var(--riga); }
.messaggi p { margin: 0; }
.messaggi strong { background: var(--tolta-scura); color: var(--inchiostro); padding: .15rem .6rem; }

@media print {
  @page { margin: 12mm; }
  html { font-size: 9pt; }
  body { background: #fff; color: #000; }
  .barra, .piede, .salta, .gruppi, .filtro, .copia, .albero, .albero-mobile { display: none !important; }
  main { max-width: none; padding: 0; }
  .palette { border: 0; background: none; }
  .palette-testa { position: static; background: none; color: #000; padding: 0; }
  table { background: none; }
  tr { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
  .gruppo table { display: table; table-layout: fixed; }
  .gruppo thead th:nth-child(1) { width: 24%; }
  .gruppo thead th:nth-child(2) { width: 24%; }
  .gruppo thead th:nth-child(4) { width: 23%; }
  .gruppo .id code { font-size: .68rem; }
  /* A4 also matches the narrow layout, where the header row is out of flow: size the cells */
  .gruppo tbody th { width: 24% !important; }
  .gruppo tbody td.k { width: 24% !important; }
  .gruppo tbody td.d { width: 29% !important; }
  .gruppo tbody td.id { width: 23% !important; }
  .gruppo tbody { display: table-row-group; }
  .gruppo tbody tr { display: table-row; }
  .gruppo tbody th, .gruppo tbody td { display: table-cell; padding: .25rem .4rem; border-bottom: 1px solid #bbb; }
  pre { background: none; color: #000; border: 1px solid #999; white-space: pre-wrap; }
}
