@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 400 800; font-stretch: 62% 125%; font-display: swap;
  src: url("fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 400 800; font-stretch: 62% 125%; font-display: swap;
  src: url("fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --ground: #1a1918;
  --layer-0: #403d39;
  --layer-1: #3c3935;
  --layer-2: #383531;
  --layer-3: #34312d;
  --layer-4: #302d2a;
  --layer-5: #2c2a27;
  --layer-6: #292725;
  --layer-7: #262523;
  --folder: #242321;
  --folder-edge: #34322f;
  --ink: #efebe4;
  --ink-soft: #c9c4bb;
  --muted: #a39e95;
  --line: #3b3936;
  --accent: #0077a8;
  --accent-ink: #58c3ef;
  --font: "Archivo", "Avenir Next", "Helvetica Neue", system-ui, sans-serif;
  --wrap: 1240px;
  --gut: clamp(16px, 4vw, 40px);
  --r: 12px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--font); font-size: 1.25rem; line-height: 1.6; font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: #fff; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
html { scrollbar-color: #4a4743 var(--ground); }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 48px; }

/* ---------- barra in alto ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--ground) 94%, transparent); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: -.01em; font-variation-settings: "wdth" 112; white-space: nowrap; }
.brand svg { width: 34px; height: 34px; flex: none; }
.top-nav { display: flex; gap: 4px; margin-left: auto; }
.top-nav a { color: var(--muted); text-decoration: none; font-size: 1rem; padding: 8px 10px; border-radius: 8px; white-space: nowrap; }
.top-nav a:hover, .top-nav a[aria-current] { color: var(--ink); background: var(--layer-3); }
.top-nav .page-link { color: var(--ink); }
.l-short { display: none; }
.btn {
  display: inline-flex; align-items: center; gap: 12px; background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 1.25rem; line-height: 1; padding: 18px 26px; border-radius: 10px; white-space: nowrap;
  transition: background-color .2s ease;
}
.btn:hover { background: #00689a; color: #fff; }
.btn svg { width: 20px; height: 20px; }
.btn-sm { font-size: 1.0625rem; padding: 12px 18px; }
.btn-sm.btn { font-weight: 700; }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1.25rem; font-weight: 600; padding: 18px 4px; }
.link-arrow:hover { color: var(--accent-ink); }
.link-arrow svg { width: 20px; height: 20px; }

/* ---------- apertura ---------- */
.hero { padding-top: clamp(40px, 6vh, 72px); }
.hero h1 {
  grid-column: 1 / span 7; font-size: clamp(2.75rem, 5.4vw, 4.75rem); line-height: 1.02; letter-spacing: -.03em;
  font-weight: 800; font-variation-settings: "wdth" 104; text-wrap: balance;
}
.hero .side { grid-column: 8 / span 5; align-self: end; display: grid; gap: 28px; }
.hero .lead { font-size: clamp(1.25rem, 1.6vw, 1.4375rem); }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.lead { font-size: clamp(1.375rem, 1.9vw, 1.625rem); line-height: 1.5; color: var(--ink-soft); max-width: 40ch; text-wrap: pretty; }

/* il cassetto: cartelle impilate con le linguette sfalsate */
.drawer { margin-top: clamp(36px, 5vh, 56px); }
.drawer ol { list-style: none; padding: 0; margin: 0; padding-top: 48px; }
.drawer li { position: relative; height: 14px; background: var(--c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055); }
.drawer a {
  position: absolute; bottom: 100%; z-index: 1; left: calc(var(--i) * 12.5%); width: calc(12.5% - 8px);
  height: 48px; display: flex; align-items: center; padding: 0 16px; background: var(--c);
  border-radius: 10px 10px 0 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07); color: var(--ink); text-decoration: none; font-size: 1.0625rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: transform .25s cubic-bezier(.2,.7,.2,1), color .2s;
}
.drawer a::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s cubic-bezier(.2,.7,.2,1); }
.drawer a:hover { transform: translateY(-6px); }
.drawer a:hover::after { transform: scaleX(1); }
.front {
  position: relative; background: var(--folder); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055);
  padding: clamp(20px, 3vw, 40px) clamp(20px, 3vw, 40px) 0; border-radius: 0 0 var(--r) var(--r);
  animation: rise .9s cubic-bezier(.16,1,.3,1) .1s both;
}
@keyframes rise { from { transform: translateY(36px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .front { animation: none; } }
.front .shot { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.front figcaption { display: none; }
.front-caption { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0 20px; color: var(--muted); font-size: 1rem; }

/* ---------- immagini con etichetta ---------- */
.shot { position: relative; border-radius: 10px; overflow: hidden; background: #f4f1ec; border: 1px solid #45423e; }
.shot img, .shot video { width: 100%; }
figure figcaption { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 14px; font-size: 1rem; line-height: 1.45; color: var(--muted); }
figure figcaption b { color: var(--ink-soft); font-weight: 600; }
figure figcaption span::before { content: "·"; margin-right: 14px; color: #5d5953; }
.dark-shot { background: #161514; }

/* ---------- cartelle (sezioni) ---------- */
.folder { margin-top: clamp(96px, 12vw, 160px); }
.tab-row { display: flex; overflow: hidden; padding-right: 0; }
.tab-row::before { content: ""; flex: 0 1 calc(var(--i) * 12.5%); }
.folder-tab {
  position: relative; flex: 0 0 auto; max-width: 100%; text-wrap: balance; background: var(--folder); border-radius: 12px 12px 0 0; padding: 18px 14px 10px 16px;
  font-size: clamp(1.75rem, 2.6vw, 2.375rem); line-height: 1.15; font-weight: 750; letter-spacing: -.02em; font-variation-settings: "wdth" 88;
}
.folder-tab::before, .folder-tab::after { content: ""; position: absolute; bottom: 0; width: 12px; height: 12px; pointer-events: none; }
.folder-tab::before { right: 100%; background: radial-gradient(circle at 0 0, transparent 11.5px, var(--folder) 12px); }
.folder-tab::after { left: 100%; background: radial-gradient(circle at 100% 0, transparent 11.5px, var(--folder) 12px); }
.folder-body {
  background: var(--folder); border-radius: var(--r); padding: clamp(28px, 5vw, 64px);
}
.folder-body { border-top-left-radius: 0; }
.folder .lead { grid-column: 1 / -1; max-width: 44ch; }
.block { grid-column: 1 / -1; }
h3 { font-size: clamp(1.5rem, 2vw, 1.875rem); line-height: 1.3; font-weight: 700; letter-spacing: -.015em; margin-bottom: 14px; text-wrap: balance; }
.text p + p { margin-top: 14px; }
.text p { color: var(--ink-soft); max-width: 44ch; text-wrap: pretty; }
.points { list-style: none; padding: 0; display: grid; gap: 18px; }
.points li { position: relative; padding-left: 30px; color: var(--ink-soft); max-width: 46ch; text-wrap: pretty; }
.points li::before { content: ""; position: absolute; left: 0; top: .78em; width: 16px; height: 1px; background: var(--muted); }
.points li b { color: var(--ink); font-weight: 650; }
.sep { grid-column: 1 / -1; height: 1px; background: var(--line); }

.c-12 { grid-column: 1 / -1; }
.c-8 { grid-column: span 8; }
.c-7 { grid-column: span 7; }
.c-6 { grid-column: span 6; }
.c-5 { grid-column: span 5; }
.c-4 { grid-column: span 4; }
.c-3 { grid-column: span 3; }
.start-9 { grid-column: 9 / span 4; }
.mid { align-self: center; }

.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.phones .shot { border-radius: 22px; }

/* link che restano validi */
.statement { font-size: clamp(1.875rem, 3.4vw, 3rem); line-height: 1.18; letter-spacing: -.025em; font-weight: 700; text-wrap: balance; max-width: 22ch; }
.flow { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.flow li { padding: 24px 24px 4px 0; border-right: 1px solid var(--line); margin-right: 24px; }
.flow li:last-child { border-right: 0; margin-right: 0; }
.flow .when { display: block; color: var(--muted); font-size: 1rem; margin-bottom: 8px; }
.flow .what { display: block; font-size: 1.375rem; line-height: 1.35; font-weight: 650; }
.flow .file { color: var(--ink); font-weight: 750; font-variation-settings: "wdth" 92; white-space: nowrap; }
.points.cols { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); column-gap: 40px; }
.front-caption b { color: var(--ink-soft); font-weight: 600; }

.modes h3 { margin-top: 20px; margin-bottom: 6px; }
.modes p { color: var(--ink-soft); }

/* chiusura */
.close { margin-top: clamp(96px, 12vw, 160px); padding-bottom: 48px; }
.close .folder-body { display: grid; gap: 28px; justify-items: start; }
.close h2 { font-size: clamp(2.5rem, 5vw, 4.25rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 800; max-width: 16ch; text-wrap: balance; }
.foot { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 1rem; display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
.foot p { max-width: 70ch; }

@media (max-width: 1260px) {
  .drawer li { height: 16px; }
  .drawer a { left: calc(var(--i4) * 25%); width: calc(25% - 8px); }
  .tab-row::before { flex-basis: calc(var(--i4, 0) * 25%); }
}
@media (max-width: 560px) {
  .drawer ol { padding-top: 46px; }
  .drawer li { height: 26px; }
  .drawer a { left: calc(var(--i2) * 50%); width: calc(50% - 6px); height: 46px; font-size: 1rem; padding: 0 12px; }
  .drawer a:hover { transform: none; }
  .tab-row::before { flex-basis: calc(var(--i2, 0) * 50%); }
}
@media (max-width: 1320px) {
  .top-nav .sec-link { display: none; }
  .top .btn-sm { margin-left: 8px; }
}
@media (max-width: 900px) {
  .grid { row-gap: 36px; }
  .c-8, .c-7, .c-6, .c-5, .c-4, .start-9, .hero h1, .hero .side, .folder .lead { grid-column: 1 / -1; }
  .flow { grid-template-columns: 1fr; }
  .flow li { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--line); padding: 18px 0; }
  .flow li:last-child { border-bottom: 0; }
}
@media (max-width: 560px) {
  body { font-size: 1.1875rem; }
  .phones { gap: 10px; }
  .phones .shot { border-radius: 14px; }
  .folder-tab { padding: 14px 20px 8px; }
  .front-caption { flex-direction: column; gap: 4px; }
  figure figcaption { flex-direction: column; gap: 2px; }
  figure figcaption span::before { content: none; }
}

/* ---------- pagina "Tutte le funzioni" ---------- */
.doc .hero h1 { font-size: clamp(2.75rem, 6vw, 5rem); }
.doc-intro { color: var(--ink-soft); }
.doc-intro p + p { margin-top: 12px; }
.doc-intro .muted, .muted { color: var(--muted); }
.doc-index { margin-top: clamp(56px, 7vw, 88px); }
.index-cols { list-style: none; padding: 0; margin: 0; columns: 3 300px; column-gap: 48px; }
.index-cols > li { break-inside: avoid; margin-bottom: 32px; }
.index-sec { display: block; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.375rem; line-height: 1.3; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.index-sec:hover { color: var(--accent-ink); }
.index-cols ul { list-style: none; padding: 0; margin: 0; }
.index-cols ul a { display: block; color: var(--ink-soft); text-decoration: none; font-size: 1.0625rem; line-height: 1.4; padding: 5px 0; }
.index-cols ul a:hover { color: var(--accent-ink); }
.doc-sec { margin-top: clamp(72px, 9vw, 120px); }
.sec-intro { max-width: 60ch; color: var(--ink-soft); font-size: clamp(1.25rem, 1.6vw, 1.4375rem); line-height: 1.55; margin-bottom: 40px; }
.sec-intro p + p { margin-top: 14px; }
.sec-intro .points { margin-top: 8px; }
.feat { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 24px; padding: 32px 0; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.feat h3 { margin: 0; font-size: 1.5rem; }
.feat-body p { color: var(--ink-soft); max-width: 60ch; }
.feat-body p + p { margin-top: 12px; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; margin: 18px 0 0; font-size: 1.0625rem; line-height: 1.5; }
.meta div { display: contents; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; color: var(--ink-soft); }
.to-top { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 1rem; }
.table-wrap { overflow-x: auto; margin: 8px 0 24px; border: 1px solid var(--line); border-radius: 10px; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 1.0625rem; line-height: 1.45; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.table-wrap thead th { color: var(--muted); font-weight: 600; background: var(--layer-6); white-space: nowrap; }
.table-wrap tbody th { font-weight: 600; color: var(--ink); min-width: 16ch; }
.table-wrap tbody tr:last-child > * { border-bottom: 0; }
.table-wrap td.yes { color: var(--ink); }
.table-wrap td.no { color: var(--muted); }
@media (max-width: 900px) {
  .feat { grid-template-columns: 1fr; row-gap: 10px; }
}

.sec-intro .points + p { margin-top: 20px; }
@media (max-width: 560px) {
  .top-inner { gap: 10px; }
  .top-nav { gap: 0; }
  .top-nav a { padding: 8px 6px; }
  .top-nav .is-current { display: none; }
  .l-long { display: none; }
  .l-short { display: inline; }
  .top .btn-sm { display: none; }
  .top-nav { margin-left: auto; }
}

/* coppie testo + immagine: nel codice il testo viene prima; sul computer l'immagine (7 colonne) si alterna a sinistra e a destra */
.pair { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 24px; align-items: center; }
.pair > .text, .pair > .points { grid-column: span 5; }
.pair > figure, .pair > .phones { grid-column: span 7; }
.pair.media-left > figure, .pair.media-left > .phones { order: -1; }
@media (max-width: 900px) {
  .pair > .text, .pair > .points, .pair > figure, .pair > .phones { grid-column: 1 / -1; order: 0; }
}

@media (max-width: 700px) { .hide-phone { display: none; } }
/* tabelle della pagina funzioni: sul telefono ogni riga diventa una scheda etichetta / valore */
@media (max-width: 700px) {
  .table-wrap { border: 0; overflow: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap th, .table-wrap td { display: block; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; padding: 6px 0; }
  .table-wrap tbody th { border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .table-wrap td { border-bottom: 0; padding: 8px 16px; }
  .table-wrap td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 1rem; }
}
