/* Le pagine di testo del sito (informativa, assistenza): un documento da leggere, non schermi.
   Titolo e data in testa, l'indice a sinistra, il testo in una colonna da 70 caratteri. */

.doc { padding: calc(var(--nav) + var(--s-8)) 0 var(--s-9); }
.doc__head { display: grid; gap: var(--s-4); padding-bottom: var(--s-7); margin-bottom: var(--s-8); border-bottom: 1px solid var(--line); }
.doc__head > * { max-width: 860px; }
.doc__eyebrow { font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.doc__head h1 { font-size: clamp(40px, 2.4vw + 26px, 64px); line-height: 1.02; }
.doc__lead { font-size: var(--t-lead); line-height: 1.5; max-width: 62ch; }
.doc__date { font-size: var(--t-small); line-height: 1.6; color: var(--ink); max-width: 70ch; }
.doc__date strong { font-weight: 600; }

.doc__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: var(--s-7); align-items: start; }
.doc__toc { grid-column: 1 / span 3; display: grid; gap: var(--s-3); font-size: var(--t-small); line-height: 1.45; }
.doc__toc-title { font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.doc__toc ol { counter-reset: voce; display: grid; gap: var(--s-2); }
.doc__toc li { counter-increment: voce; display: grid; grid-template-columns: 2.2em minmax(0, 1fr); }
.doc__toc li::before { content: counter(voce) "."; color: var(--muted); font-variant-numeric: tabular-nums; }
.doc__toc a { color: var(--ink); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color .2s; }
.doc__toc a:hover { text-decoration-color: currentColor; }
.doc__mail { margin-top: var(--s-4); justify-self: start; }
.doc__body { grid-column: 5 / span 8; max-width: 72ch; font-size: 17px; line-height: 1.65; }
@media (max-width: 1023px) {
  .doc__toc, .doc__body { grid-column: 1 / -1; }
  .doc__toc { padding-bottom: var(--s-6); border-bottom: 1px solid var(--line); }
}
@media (max-width: 639px) { .doc { padding-top: calc(var(--nav) + var(--s-7)); } .doc__body { font-size: 16px; } }

/* il testo: il kit azzera margini ed elenchi, qui tornano quelli di un documento */
.doc__body > :first-child { margin-top: 0; }
.doc__body :is(p, ul, ol, table, .scheda, .scorrevole) { margin: 0 0 14px; }
.doc__body h2 { font-size: clamp(26px, .8vw + 20px, 34px); line-height: 1.15; margin: 56px 0 16px; scroll-margin-top: calc(var(--nav) + 24px); }
.doc__body h2:first-child { margin-top: 0; }
.doc__body h3 { font: 600 18px/1.4 var(--font-text); letter-spacing: 0; margin: 28px 0 8px; }
.doc__body ul { list-style: disc; padding-left: 1.3em; }
.doc__body ol { list-style: decimal; padding-left: 1.4em; }
.doc__body li { margin-bottom: 6px; }
.doc__body li::marker { color: var(--muted); }
.doc__body a { color: var(--p-accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.doc__body a:hover { text-decoration-thickness: 2px; }
.doc__body strong { font-weight: 600; }
.doc__body code { font-family: var(--font-mono); font-size: .86em; background: var(--p-surface); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }

.scheda { background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; }
.scheda h3 { margin-top: 0; }
.scheda > :last-child { margin-bottom: 0; }
.scheda .etichetta { display: block; font-size: var(--t-label); font-weight: 500; color: var(--muted); margin-top: 12px; }
.segnaposto { background: #F6E9CC; padding: 1px 4px; border-radius: 3px; font-weight: 600; }

.scorrevole { overflow-x: auto; }
.doc__body table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.doc__body :is(th, td) { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc__body tr:last-child td { border-bottom: 0; }
.doc__body th { background: var(--ground-bg); font-weight: 600; }

.doc__note { margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--line); font-size: var(--t-small); color: var(--muted); }
.doc__note a { color: inherit; }

.footer { padding-block: var(--s-8) var(--s-6); }
.footer__lede { font: var(--display-weight) 24px/1.15 var(--font-display); }
.footer a[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }
