/* =========================================================
   Documentazione (/docs/): stesso linguaggio del sito, nessun colore, font o componente nuovo.
   Variabili e componenti riusati da style.css / pages.css / sub.css (.support-hero, .support-search, .link-list,
   .h-sec, .sec-inner, .pd-bar, .button); qui solo ciò che serve a un testo lungo con colonna dei capitoli.
   Colori del sito: testo #1d1d1f, secondario #424245, attenuato #6e6e73, tenue #86868b, linee #d2d2d7,
   fondo alternato #f5f5f7, link var(--link), arancio dei badge #bf4800.
   Il sito non ha tema scuro: neppure questo foglio.
   ========================================================= */

/* ---------- Pagina con colonna dei capitoli ---------- */
.dw { --dw-top: calc(var(--nav-h) + 52px); display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 0 56px; align-items: start; max-width: 1136px; margin: 0 auto; padding: 36px 22px 100px; }

.dw-nav { position: sticky; top: calc(var(--dw-top) + 16px); max-height: calc(100vh - var(--dw-top) - 32px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 4px; }
.dw-nav > summary { display: none; }
.dw-et { margin: 18px 0 6px; padding: 0 10px; font-size: 12px; line-height: 1.33; letter-spacing: -.01em; color: #6e6e73; }
.dw-et:first-child { margin-top: 0; }
.dw-nav a, .dw-nav details > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; padding: 5px 10px; border-radius: 8px; font-size: 14px; line-height: 1.3; letter-spacing: -.01em; color: #1d1d1f; }
.dw-nav a:hover, .dw-nav details > summary:hover { background: #f5f5f7; }
.dw-nav a[aria-current="page"] { background: #f5f5f7; font-weight: 600; }
.dw-nav details > summary { cursor: pointer; font-weight: 600; list-style: none; }
.dw-nav details > summary::-webkit-details-marker { display: none; }
.dw-nav details > summary::after { content: ""; flex: none; width: 7px; height: 7px; margin-right: 3px; border-right: 1.4px solid #86868b; border-bottom: 1.4px solid #86868b; transform: rotate(45deg); transition: transform .25s; }
.dw-nav details[open] > summary::after { transform: rotate(-135deg); }
.dw-nav details > ul { margin: 2px 0 8px 10px; padding-left: 8px; border-left: 1px solid #d2d2d7; }
.dw-nav details li a { min-height: 28px; font-size: 13px; color: #424245; }
.dw-nav details li a[aria-current="page"] { color: #1d1d1f; }

.dw-art { min-width: 0; max-width: 776px; font-size: 17px; line-height: 1.5; letter-spacing: -.022em; }
.dw-art a { color: var(--link); }
.dw-art a:hover { text-decoration: underline; }
.dw-art a:focus-visible, .dw-nav a:focus-visible, .dw-nav summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.dw-art .molliche { margin: 0 0 14px; font-size: 14px; line-height: 1.43; color: #6e6e73; }
.dw-art .molliche a { color: var(--link); }
.dw-art h1 { margin: 0 0 8px; font-size: 48px; line-height: 52px; font-weight: 600; letter-spacing: -.01em; color: #1d1d1f; }
.dw-art .aggiornato { margin: 0 0 28px; font-size: 14px; line-height: 1.43; color: #6e6e73; }

/* ---------- Scheda «In breve» ---------- */
.scheda { float: right; width: 264px; margin: 4px 0 20px 32px; padding: 18px 20px 20px; border-radius: 18px; background: #f5f5f7; font-size: 14px; line-height: 1.4; letter-spacing: -.016em; }
.scheda-t { margin: 0 0 4px; font-size: 17px; line-height: 1.24; font-weight: 600; color: #1d1d1f; }
.scheda dl { margin: 0; }
.scheda dt { margin-top: 12px; font-size: 12px; line-height: 1.33; color: #6e6e73; }
.scheda dd { margin: 2px 0 0; color: #1d1d1f; }
.scheda ul { margin: 0; padding: 0; }
.scheda li { margin: 2px 0; }

/* ---------- Testo della voce ---------- */
.contenuto { color: #1d1d1f; }
.contenuto p { margin: 0 0 14px; }
.contenuto .incipit { font-size: 21px; line-height: 1.38; letter-spacing: .011em; color: #424245; margin-bottom: 18px; }
.contenuto h2, .contenuto h3, .contenuto h4 { scroll-margin-top: calc(var(--dw-top) + 16px); }
.contenuto h2 { margin: 52px 0 12px; font-size: 28px; line-height: 32px; font-weight: 600; letter-spacing: .007em; color: #1d1d1f; }
.contenuto h3 { margin: 32px 0 8px; font-size: 21px; line-height: 25px; font-weight: 600; letter-spacing: .011em; color: #1d1d1f; }
.contenuto h4 { margin: 24px 0 6px; font-size: 17px; line-height: 1.24; font-weight: 600; }
.contenuto h2 a.ancora, .contenuto h3 a.ancora { margin-left: 8px; color: #86868b; font-weight: 400; opacity: 0; transition: opacity .2s; }
.contenuto h2:hover a.ancora, .contenuto h3:hover a.ancora, .contenuto a.ancora:focus { opacity: 1; text-decoration: none; }
.contenuto ul, .contenuto ol { margin: 0 0 14px; padding-left: 24px; }
.contenuto ul { list-style: disc; }
.contenuto ol { list-style: decimal; }
.contenuto ul ul { list-style: circle; margin: 4px 0 4px; }
.contenuto li { margin: 5px 0; padding-left: 2px; }
.contenuto li::marker { color: #86868b; }
.contenuto strong { font-weight: 600; }
.contenuto hr { margin: 36px 0; border: 0; border-top: 1px solid #d2d2d7; }
.contenuto code { padding: 1px 6px; border-radius: 6px; background: #f5f5f7; font: 500 .88em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0; color: #1d1d1f; word-break: break-word; }
.contenuto pre { margin: 18px 0; padding: 16px 18px; overflow-x: auto; border-radius: 14px; background: #f5f5f7; font-size: 14px; line-height: 1.5; }
.contenuto pre code { padding: 0; background: none; font-size: inherit; }
.contenuto kbd { padding: 1px 7px; border: 1px solid #d2d2d7; border-bottom-width: 2px; border-radius: 6px; background: #fff; font: 500 .85em var(--font-text); }
.contenuto blockquote { margin: 18px 0; padding: 2px 0 2px 18px; border-left: 3px solid #d2d2d7; color: #424245; }

/* selettore di lingua (compare solo sulle pagine che esistono in più lingue) e nota delle pagine tradotte */
.lingue { display: inline-flex; gap: 2px; margin: 0 0 14px; padding: 3px; border-radius: 980px; background: #f5f5f7; font-size: 13px; line-height: 1; }
.lingue a { padding: 7px 14px; border-radius: 980px; color: #424245; }
.lingue a:hover { text-decoration: none; color: #1d1d1f; }
.lingue a[aria-current="true"] { background: #fff; color: #1d1d1f; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.14); pointer-events: none; }
.dh-hero .lingue { margin-bottom: 18px; }
.nota-traduzione { margin: 0 0 18px; font-size: 14px; line-height: 1.43; color: #6e6e73; }

/* indice della voce */
.indice-voce { display: inline-block; min-width: 280px; max-width: 100%; margin: 4px 0 14px; border: 1px solid #d2d2d7; border-radius: 14px; background: #fff; font-size: 15px; line-height: 1.4; }
.indice-voce summary { padding: 11px 16px; cursor: pointer; font-size: 17px; font-weight: 600; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.indice-voce summary::-webkit-details-marker { display: none; }
.indice-voce summary::after { content: ""; width: 7px; height: 7px; border-right: 1.4px solid #86868b; border-bottom: 1.4px solid #86868b; transform: rotate(45deg); transition: transform .25s; }
.indice-voce[open] summary::after { transform: rotate(-135deg); }
.indice-voce ol { margin: 0; padding: 0 16px 12px 40px; list-style: decimal; }
.indice-voce ol ol { padding: 0 0 0 20px; margin-top: 2px; }
.indice-voce li { margin: 3px 0; padding-left: 0; }
.indice-voce li::marker { color: #86868b; }

/* tabelle */
.contenuto .tabella { margin: 20px 0 24px; overflow-x: auto; border: 1px solid #d2d2d7; border-radius: 14px; }
.contenuto table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 15px; line-height: 1.4; letter-spacing: -.016em; }
.contenuto th, .contenuto td { padding: 11px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid #e5e5ea; }
.contenuto th { background: #f5f5f7; font-size: 14px; font-weight: 600; color: #1d1d1f; border-bottom-color: #d2d2d7; }
.contenuto tr:last-child td { border-bottom: 0; }
.contenuto td p, .contenuto th p { margin: 0; }

/* riquadri Nota / Attenzione / Riservato e avviso «Voce principale» */
.contenuto .ambox { margin: 22px 0; padding: 16px 20px 6px; border-radius: 18px; background: #f5f5f7; font-size: 16px; line-height: 1.45; }
.contenuto .ambox::before { content: attr(data-titolo); display: block; margin-bottom: 4px; font-size: 12px; line-height: 1.33; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: #6e6e73; }
.contenuto .ambox.attenzione { background: #fdf3ea; }
.contenuto .ambox.attenzione::before { color: #bf4800; }
.contenuto .ambox p { margin: 0 0 10px; }
.contenuto .ambox ul, .contenuto .ambox ol { margin-bottom: 10px; }
.contenuto .hatnote { margin: 0 0 16px; padding-left: 14px; border-left: 3px solid #d2d2d7; font-size: 15px; line-height: 1.45; color: #6e6e73; }
.contenuto .hatnote p { margin: 0; }

/* piede della voce e navigazione del capitolo */
.piede { clear: both; margin-top: 48px; padding-top: 18px; border-top: 1px solid #d2d2d7; font-size: 14px; line-height: 1.43; color: #6e6e73; }
.navbox { clear: both; margin-top: 28px; border-radius: 18px; background: #f5f5f7; font-size: 14px; line-height: 1.43; }
.navbox summary { padding: 14px 20px; cursor: pointer; font-size: 17px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.navbox summary::-webkit-details-marker { display: none; }
.navbox summary::after { content: ""; width: 7px; height: 7px; border-right: 1.4px solid #86868b; border-bottom: 1.4px solid #86868b; transform: rotate(45deg); transition: transform .25s; }
.navbox[open] summary::after { transform: rotate(-135deg); }
.navbox ul { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0 20px 18px; }
.navbox a[aria-current="page"] { color: #1d1d1f; font-weight: 600; pointer-events: none; }

/* elenchi di voci (capitoli e indice) */
.elenco-voci { margin: 0; padding: 0; }
.elenco-voci li { padding: 14px 0; border-bottom: 1px solid #d2d2d7; }
.elenco-voci a { font-size: 17px; font-weight: 600; }
.elenco-voci span, .elenco-voci small { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; line-height: 1.4; color: #6e6e73; }
.dw-art .elenco-voci { list-style: none; padding-left: 0; }
.dw-art .elenco-voci li { margin: 0; padding-left: 0; }
.lettere { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; }
.lettere a { display: block; min-width: 34px; padding: 6px 10px; border-radius: 980px; background: #f5f5f7; font-size: 14px; font-weight: 600; text-align: center; color: #1d1d1f; }
.lettere a:hover { background: #e8e8ed; text-decoration: none; }

/* ---------- Home della guida ---------- */
.dh-hero { padding-bottom: 20px; }
.dh-lead { margin: 16px auto 0; max-width: 700px; font-size: 24px; line-height: 1.33; color: #424245; }
.dh-nota { margin: 22px auto 0; max-width: 620px; font-size: 14px; line-height: 1.43; color: #6e6e73; }
.dh-sec { padding: 80px 0 0; }
.dh-ultima { padding-bottom: 100px; }
.dh-sec .link-list { margin-top: 36px; }
.dh-lista a { align-items: center; }
.dh-lista small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font-size: 14px; font-weight: 400; line-height: 1.35; color: #6e6e73; }
.dh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1036px; margin: 40px auto 0; padding: 0 22px; }
.dh-cap { display: flex; flex-direction: column; min-height: 230px; padding: 32px 28px 28px; border-radius: 28px; background: #f5f5f7; transition: background .2s; }
.dh-cap:hover { background: #ececf0; }
.dh-cap h3 { margin: 0; font-size: 24px; line-height: 28px; font-weight: 600; letter-spacing: .009em; }
.dh-cap p { flex: 1; margin: 10px 0 16px; font-size: 17px; line-height: 1.35; color: #424245; }
.dh-cap small { font-size: 14px; color: #6e6e73; }

/* ---------- Indice A-Z con ricerca ---------- */
.dx-esito { margin: 18px 0 0; font-size: 17px; line-height: 1.4; color: #6e6e73; }
.dx-sec { background: #fff; }
.dx-in { max-width: 820px; margin: 0 auto; padding: 24px 22px 100px; }
.dx-in h2 { margin: 44px 0 4px; font-size: 28px; line-height: 32px; font-weight: 600; scroll-margin-top: calc(var(--nav-h) + 52px + 16px); }
.dx-in a { color: var(--link); }
.dx-in a:hover { text-decoration: underline; }
.dx-in .lettere a { color: #1d1d1f; }
.dx-in .lettere a:hover { text-decoration: none; }
.dx-risultati { margin-bottom: 12px; }
.dx-risultati li:first-child { border-top: 1px solid #d2d2d7; }
.dx-risultati small { margin-top: 4px; font-size: 12px; }

/* ---------- Tablet e telefono ---------- */
@media (max-width: 1068px) {
  .dw { gap: 0 36px; grid-template-columns: 220px minmax(0, 1fr); }
  .dw-art h1 { font-size: 40px; line-height: 44px; }
  .dh-grid { grid-template-columns: repeat(2, 1fr); }
  .scheda { width: 232px; margin-left: 24px; }
}
@media (max-width: 899px) {
  /* colonna dei capitoli sopra il testo, chiusa: la apre chi la vuole */
  .dw { display: block; padding: 20px 16px 72px; }
  .dw-nav { position: static; max-height: none; overflow: visible; margin: 0 0 24px; padding: 0; }
  .dw-nav > summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 18px; border-radius: 14px; background: #f5f5f7; font-size: 17px; font-weight: 600; cursor: pointer; list-style: none; }
  .dw-nav > summary::-webkit-details-marker { display: none; }
  .dw-nav > summary::after { content: ""; width: 8px; height: 8px; border-right: 1.4px solid #86868b; border-bottom: 1.4px solid #86868b; transform: rotate(45deg); transition: transform .25s; }
  .dw-nav[open] > summary::after { transform: rotate(-135deg); }
  .dw-nav > nav { padding-top: 12px; }
  .scheda { float: none; width: auto; margin: 0 0 24px; }
}
@media (max-width: 734px) {
  .dw { --dw-top: calc(var(--nav-h) + 48px); }
  .dw-art { font-size: 17px; }
  .dw-art h1 { font-size: 34px; line-height: 38px; }
  .contenuto .incipit { font-size: 19px; }
  .contenuto h2 { margin-top: 40px; font-size: 24px; line-height: 28px; }
  .contenuto h3 { font-size: 19px; line-height: 23px; }
  .dh-lead { font-size: 19px; }
  .dh-sec { padding-top: 56px; }
  .dh-ultima { padding-bottom: 64px; }
  .dh-grid { grid-template-columns: 1fr; gap: 12px; padding: 0 16px; margin-top: 28px; }
  .dh-cap { min-height: 0; border-radius: 22px; padding: 24px 22px; }
  .dx-in { padding: 8px 16px 72px; }
  .contenuto th, .contenuto td { padding: 10px 12px; }
  .indice-voce { display: block; min-width: 0; }
  /* tabelle: una scheda per riga, niente scorrimento orizzontale. La prima cella fa da titolo, le altre mostrano il nome della colonna. */
  .contenuto .tabella { overflow: visible; border: 0; border-radius: 0; }
  .contenuto table, .contenuto tbody, .contenuto tr, .contenuto td { display: block; width: 100%; min-width: 0; }
  .contenuto thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .contenuto tr { margin: 0 0 12px; overflow: hidden; border: 1px solid #d2d2d7; border-radius: 14px; background: #fff; }
  .contenuto tr:last-child { margin-bottom: 0; }
  .contenuto td { padding: 10px 14px; overflow-wrap: anywhere; }
  .contenuto tr:last-child td { border-bottom: 1px solid #e5e5ea; }
  .contenuto td:last-child, .contenuto tr:last-child td:last-child { border-bottom: 0; }
  .contenuto td:first-child { background: #f5f5f7; font-weight: 600; border-bottom-color: #d2d2d7; }
  .contenuto td:first-child::before { display: none; }
  .contenuto td::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 12px; line-height: 1.33; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: #6e6e73; }
  .contenuto td[data-label=""]::before { display: none; }
}

/* ---------- Stampa ---------- */
@media print {
  .gnav, .pd-bar, .dw-nav, .navbox, .footer, .mobile-menu, .flyout, .panel, .nav-scrim, .contenuto a.ancora { display: none !important; }
  .pg { padding-top: 0; }
  .dw { display: block; padding: 0; }
  .scheda { background: none; border: 1px solid #999; }
  .dw-art a { color: #000; }
}
