/* Wevo — stile condiviso dei documenti legali.
   Sobrio e leggibile: nessun neon, nessun colore di prodotto. Questi documenti
   devono leggersi come documenti, non come una schermata dell'app. */

:root {
  --paper: #14131a;
  --ink: #d8d6e0;
  --ink-strong: #f2f1f6;
  --ink-soft: #918da0;
  --rule: #2a2833;
  --accent: #9a93c4;
  --link: #a9c4e0;
}

@media (prefers-color-scheme: light) {
  :root {
    --paper: #fbfaf8;
    --ink: #33313d;
    --ink-strong: #16151c;
    --ink-soft: #6f6b7c;
    --rule: #e2dfe6;
    --accent: #55507a;
    --link: #2f5d8a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 6rem;
}

.back-home {
  display: inline-block;
  margin-bottom: 2rem;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.back-home:hover { color: var(--link); text-decoration: underline; }

header.doc-head {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.75rem;
  margin-bottom: 2.5rem;
}

.eyebrow {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 600;
  color: var(--ink-strong);
  margin: 0 0 0.75rem;
}

.meta {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0;
}

.lede {
  font-size: 1.05rem;
  color: var(--ink);
  margin: 1.5rem 0 0;
}

h2 {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink-strong);
  margin: 2.75rem 0 0.85rem;
  padding-top: 0.25rem;
}

h3 {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-strong);
  margin: 1.75rem 0 0.6rem;
}

p, li { margin: 0 0 0.9rem; }
ul, ol { padding-left: 1.35rem; }
li { margin-bottom: 0.5rem; }

strong { color: var(--ink-strong); font-weight: 600; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* Indice */
nav.toc {
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin: 2.5rem 0;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.9rem;
}
nav.toc h2 {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
}
nav.toc ol { margin: 0; padding-left: 1.2rem; column-gap: 2rem; }
nav.toc li { margin-bottom: 0.3rem; }
nav.toc a { color: var(--ink); text-decoration: none; }
nav.toc a:hover { color: var(--link); text-decoration: underline; }

/* Tabella (dati / conservazione) */
.table-wrap { overflow-x: auto; margin: 1.25rem 0 1.5rem; }
table {
  width: 100%;
  border-collapse: collapse;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.9rem 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}
th {
  font-weight: 600;
  color: var(--ink-strong);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
td:first-child { padding-right: 1.5rem; white-space: nowrap; }
@media (max-width: 34rem) {
  td:first-child { white-space: normal; }
  table { font-size: 0.85rem; }
}

/* Blocco identificativo del fornitore, in coda al documento */
.entity {
  border-top: 1px solid var(--rule);
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ink);
}
.entity dt {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.9rem;
}
.entity dt:first-child { margin-top: 0; }
.entity dd { margin: 0.1rem 0 0; }

footer.doc-foot {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding-top: 1.5rem;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
footer.doc-foot a { color: var(--ink-soft); }
