/* /docs — portale della documentazione (assets/js/modules/docs.js). Uno strumento di lettura: denso dove serve
   (indice, tabelle, codice), arioso nella pagina. Stessi token del sistema, chiaro e scuro. */
.s-docs { padding: calc(var(--header) + clamp(28px, 4vw, 56px)) 0 clamp(89px, 10vw, 144px); }
.dc { --dc-top: calc(var(--header) + 20px); color: var(--ink); }
.dc a { color: inherit; }
.dc .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ——— Pagina iniziale ——— */
.dc-home { max-width: 1440px; margin: 0 auto; padding: 0 var(--edge); }
.dc-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(34px, 6vw, 120px); align-items: end; padding: clamp(21px, 4vw, 68px) 0 clamp(55px, 7vw, 110px); border-bottom: 1px solid var(--line); }
.dc-hero .dc-h1 { font-size: clamp(52px, 7.4vw, 124px); line-height: .92; letter-spacing: -.04em; margin: 21px 0 26px; }
.dc-hero .dc-lead { max-width: 30em; }
.dc-h1 { margin: 0; font: 700 clamp(36px, 4.2vw, 62px)/.98 var(--font-sans); letter-spacing: -.035em; text-wrap: balance; }
.dc-h1 em { font-family: var(--font-voice); font-style: italic; font-weight: 800; letter-spacing: -.02em; }
.dc-lead { margin: 0; font: 400 clamp(18px, 1.35vw, 22px)/1.5 var(--font-sans); color: var(--ink-2); text-wrap: pretty; }
.dc-note { margin: 12px 0 0; font-size: 14px; color: var(--ink-3); }
.dc-index > ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(34px, 4vw, 72px); }
.dc-index > ol > li { padding: clamp(28px, 3vw, 44px) 0 clamp(21px, 2.4vw, 34px); border-bottom: 1px solid var(--line); break-inside: avoid; }
.dc-index-s { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: baseline; text-decoration: none; }
.dc-n { grid-row: span 2; font: italic 800 clamp(26px, 2.2vw, 34px)/1 var(--font-voice); color: var(--ink-3); font-variant-numeric: lining-nums; transition: color var(--t-1); }
.dc-index-s b { font: 700 clamp(21px, 1.7vw, 26px)/1.1 var(--font-sans); letter-spacing: -.02em; }
.dc-index-s small { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.dc-index-s:hover .dc-n { color: var(--drip-ink); }
.dc-index ul { list-style: none; margin: 16px 0 0; padding: 0 0 0 calc(clamp(26px, 2.2vw, 34px) * 1.1 + 14px); display: grid; gap: 0; }
.dc-index ul a { display: inline-block; padding-block: var(--s1); font-size: 15.5px; line-height: 1.35; color: var(--ink-2); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size var(--t-2) var(--ease-out), color var(--t-1); }
.dc-index ul a:hover { color: var(--ink); background-size: 100% 1px; }
@media (max-width: 1100px) { .dc-index > ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dc-hero { grid-template-columns: 1fr; align-items: start; } }
@media (max-width: 640px) { .dc-index > ol { grid-template-columns: 1fr; } }

/* ——— Ricerca ——— */
.dc-search { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.dc-search label { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: var(--r-control); background: var(--field); box-shadow: inset 0 0 0 1px var(--field-line); color: var(--ink-3); }
.dc-search label:focus-within { box-shadow: inset 0 0 0 1px var(--drip-ink), 0 0 0 3px color-mix(in srgb, var(--drip) 30%, transparent); }
.dc-search label svg { width: 17px; height: 17px; flex: none; }
.dc-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--ink); font: 500 16px/1 var(--font-sans); }
.dc-search input:focus-visible { outline: none; }
.dc-search.big label { height: 58px; } .dc-search.big input { font-size: 18px; }
.dc-ask { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border: 0; border-radius: var(--r-control); background: var(--ink); color: var(--paper); font: 700 14px/1 var(--font-sans); cursor: pointer; white-space: nowrap; transition: background var(--t-1), color var(--t-1); }
.dc-search.big .dc-ask { height: 58px; padding: 0 20px; }
.dc-ask svg { width: 16px; height: 16px; color: var(--tone-orange); }
.dc-ask:hover { background: var(--drip); color: var(--on-drip); } .dc-ask:hover svg { color: inherit; }
.dc-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; max-height: min(460px, 60vh); overflow-y: auto; padding: 6px; border-radius: var(--r-card); background: var(--surface-2); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.dc-res-h { margin: 0; padding: 8px 10px; font-size: 13px; color: var(--ink-3); }
.dc-results ol { list-style: none; margin: 0; padding: 0; }
.dc-results a { display: grid; gap: 3px; padding: 10px 12px; border-radius: var(--r-control); text-decoration: none; }
.dc-results a:hover, .dc-results a:focus-visible { background: var(--hover); outline-offset: -2px; }
.dc-results b { font: 650 15px/1.3 var(--font-sans); } .dc-results b span { font-weight: 500; color: var(--ink-3); }
.dc-results small { font-size: 13px; line-height: 1.45; color: var(--ink-3); }
@media (max-width: 520px) { .dc-ask span { display: none; } .dc-ask { width: 46px; padding: 0; justify-content: center; } .dc-search.big .dc-ask { width: 58px; padding: 0; } }

/* ——— Articolo: indice · testo · in questa pagina ——— */
.dc-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(34px, 4vw, 72px); max-width: 1440px; margin: 0 auto; padding: 0 var(--edge); align-items: start; }
.dc-main { display: grid; grid-template-columns: minmax(0, 46rem) 210px; column-gap: clamp(34px, 4vw, 64px); align-items: start; }
.dc-top { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr minmax(260px, 420px); align-items: center; gap: 21px; padding-bottom: 21px; margin-bottom: clamp(34px, 4vw, 55px); border-bottom: 1px solid var(--line); }
.dc-crumbs { min-width: 0; } .dc-crumbs a { display: inline-block; padding-block: var(--s1); }
.dc-nav { position: sticky; top: var(--dc-top); max-height: calc(100vh - var(--dc-top) - 21px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 2px 6px 21px 0; font-size: 14.5px; }
.dc-nav ol { list-style: none; margin: 0; padding: 0; }
.dc-nav > ol > li + li { margin-top: 2px; }
.dc-nav-s { display: block; padding: 7px 10px; border-radius: var(--r-control); font-weight: 650; text-decoration: none; letter-spacing: -.005em; }
.dc-nav li ol { margin: 2px 0 10px 10px; padding-left: 10px; border-left: 1px solid var(--line); }
.dc-nav li ol a { display: block; padding: 6px 10px; border-radius: var(--r-control); color: var(--ink-2); text-decoration: none; line-height: 1.3; }
.dc-nav a:hover { background: var(--hover); color: var(--ink); }
.dc-nav a[aria-current] { background: var(--selected); color: var(--ink); font-weight: 600; }
.dc-nav li:not(.open) > ol { display: none; }
.dc-kick { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; font: 500 14px/1.2 var(--font-sans); color: var(--ink-2); }
.dc-kick::before { content: ''; width: 5px; height: 13px; background: var(--drip); transform: skewX(calc(var(--slash) * -1)); }
.dc-art > header { padding-bottom: clamp(28px, 3vw, 44px); }
.dc-art > header .dc-lead { margin-top: 18px; max-width: 36em; }
.dc-body { font: 400 17.5px/1.7 var(--font-sans); color: var(--ink); max-width: 42em; }
.dc-body > * + * { margin-top: 18px; }
.dc-body p { margin-bottom: 0; text-wrap: pretty; }
.dc-body h2 { margin: clamp(44px, 4.5vw, 64px) 0 0; font: 700 clamp(24px, 2vw, 30px)/1.15 var(--font-sans); letter-spacing: -.02em; scroll-margin-top: calc(var(--header) + 24px); }
.dc-body h3 { margin: 34px 0 0; font: 700 19px/1.25 var(--font-sans); scroll-margin-top: calc(var(--header) + 24px); }
.dc-body ul, .dc-body ol { padding-left: 1.3em; } .dc-body li + li { margin-top: 6px; } .dc-body li::marker { color: var(--ink-3); }
.dc-body a, .dc-rel a b, .dc-art > header a { color: var(--drip-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.dc-body a:hover { color: var(--ink); }
.dc-body :not(pre) > code, .dc-table code { padding: .12em .38em; border-radius: var(--r-tag); background: var(--code-bg); color: var(--code-ink); font: .86em/1.4 var(--font-mono); overflow-wrap: anywhere; }
.dc-body .ds-code { margin-top: 26px; } .dc-body .ds-callout { margin-top: 26px; }
.dc-table { overflow-x: auto; border-radius: var(--r-control); box-shadow: 0 0 0 1px var(--line); scrollbar-width: thin; }
.dc-table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.dc-table th, .dc-table td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.dc-table thead th { background: var(--sunken); color: var(--ink-3); font: 600 13px/1.3 var(--font-sans); white-space: nowrap; }
.dc-table tbody th { font-weight: 600; min-width: 9em; }
.dc-table tbody tr:last-child > * { border-bottom: 0; }
.dc-toc { position: sticky; top: var(--dc-top); font-size: 13.5px; }
.dc-toc p { margin: 0 0 10px; font-weight: 600; color: var(--ink-3); font-size: 12.5px; }
.dc-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.dc-toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-3); text-decoration: none; line-height: 1.35; }
.dc-toc a:hover { color: var(--ink); } .dc-toc a[aria-current] { color: var(--ink); border-left-color: var(--ink); font-weight: 600; }
/* precedente / successiva, correlati, riscontro */
.dc-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 21px; margin-top: clamp(55px, 6vw, 89px); padding-top: 21px; border-top: 1px solid var(--line); }
.dc-pn a { display: grid; gap: 6px; padding: 8px 0; text-decoration: none; }
.dc-pn .next { text-align: right; }
.dc-pn small { font-size: 13px; color: var(--ink-3); } .dc-pn b { font: 700 18px/1.25 var(--font-sans); letter-spacing: -.01em; }
.dc-pn a:hover b { color: var(--drip-ink); }
.dc-rel { margin-top: clamp(44px, 5vw, 72px); }
.dc-rel h2 { margin: 0 0 10px; font: 600 13px/1.2 var(--font-sans); color: var(--ink-3); }
.dc-rel ul { list-style: none; margin: 0; padding: 0; }
.dc-rel a { display: grid; gap: 4px; padding: 14px 0; border-top: 1px solid var(--line); text-decoration: none; }
.dc-rel a b { font: 650 16.5px/1.3 var(--font-sans); text-decoration: none; color: var(--ink); } .dc-rel a:hover b { color: var(--drip-ink); }
.dc-rel a span { font-size: 14.5px; color: var(--ink-3); line-height: 1.45; }
.dc-fb { margin-top: clamp(44px, 5vw, 72px); padding: 21px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.dc-fb > p { margin: 0; font-weight: 600; }
.dc-fb-b { display: flex; gap: 8px; } .dc-fb-b[hidden] { display: none; }
.dc-fb-more { display: grid; gap: 10px; max-width: 34em; } .dc-fb-more[hidden] { display: none; }
.dc-fb label { display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.dc-fb textarea { padding: 10px 12px; border-radius: var(--r-control); border: 1px solid var(--field-line); background: var(--field); color: var(--ink); font: 400 15px/1.45 var(--font-sans); resize: vertical; }
.dc-fb .ds-btn { justify-self: start; }
.dc-fb-out { margin: 0; font-size: 14px; color: var(--ink-2); } .dc-fb-out:empty { display: none; }
.dc-fb .dp-chip { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); font: 600 14px/1 var(--font-sans); cursor: pointer; }
.dc-fb .dp-chip:hover { background: var(--hover); } .dc-fb .dp-chip[aria-pressed='true'] { background: var(--ink); color: var(--paper); box-shadow: none; }
.dc .dp-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; font: 500 13.5px/1.3 var(--font-sans); color: var(--ink-3); }
.dc .dp-crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--line-2); }
.dc .dp-crumbs a { color: var(--ink-2); text-decoration: none; } .dc .dp-crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.dc .dp-crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.dc .dp-src { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 1240px) { .dc-main { grid-template-columns: minmax(0, 1fr); } .dc-toc { display: none; } }
@media (max-width: 900px) {
  .dc-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dc-nav { position: static; max-height: none; overflow: visible; order: 2; margin-top: clamp(55px, 8vw, 89px); padding: 21px 0 0; border-top: 1px solid var(--line); }
  .dc-nav li:not(.open) > ol { display: none; }
  .dc-top { grid-template-columns: 1fr; }
  .dc-pn { grid-template-columns: 1fr; } .dc-pn .next { text-align: left; }
}

/* Schermate vere (chiaro e scuro, segue il tema) e guide passo passo */
.dc-shot { margin: 34px 0; }
.dc-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-card); box-shadow: 0 0 0 1px var(--line), var(--shadow-2); background: var(--surface-1); }
.dc-shot .dc-d { display: none; }
:root[data-theme='dark'] .dc-shot .dc-l { display: none; }
:root[data-theme='dark'] .dc-shot .dc-d { display: block; }
.dc-shot figcaption { margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.dc-steps { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 21px; margin: 34px 0; }
.dc-steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; align-content: start; }
.dc-steps [data-step] { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--r-control); background: transparent; color: var(--ink); text-align: left; cursor: pointer; transition: background var(--m-hover, var(--motion-duration-fast)); }
.dc-steps [data-step]:hover { background: var(--hover); }
.dc-steps [data-step][aria-pressed='true'] { background: var(--surface-1); box-shadow: 0 0 0 1px var(--line); }
.dc-steps [data-step] span { grid-row: span 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sunken); font: 700 12.5px/1 var(--font-sans); }
.dc-steps [data-step][aria-pressed='true'] span { background: var(--drip); color: #0D0D0D; }
.dc-steps [data-step] b { font: 600 15px/1.3 var(--font-sans); }
.dc-steps [data-step] small { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.dc-steps-v { position: sticky; top: calc(var(--header, 78px) + 21px); align-self: start; }
.dc-steps-v .dc-shot { margin: 0; }
.dc-steps [hidden] { display: none; }
@media (max-width: 860px) { .dc-steps { grid-template-columns: 1fr; } }
.dc-shot img { cursor: zoom-in; }
.dc-zoom { width: min(1440px, 96vw); max-width: none; max-height: 94vh; padding: 0; border: 0; border-radius: var(--r-card); background: transparent; box-shadow: var(--shadow-3); cursor: zoom-out; }
.dc-zoom::backdrop { background: rgba(13, 13, 13, .62); backdrop-filter: blur(4px); }
.dc-zoom img { display: block; width: 100%; height: auto; border-radius: var(--r-card); }
