/* ==========================================================================
   Documenti stampabili (cartella /stampa) — A4, bianco e nero, alto contrasto.
   Pensati per essere letti senza corrente: caratteri grandi, niente colori
   indispensabili, spazi da compilare a penna. A schermo appaiono come fogli.
   ========================================================================== */
:root { --ink: #111; --mute: #444; --line: #777; --soft: #eee; }
* { box-sizing: border-box; }
html { background: #d9d9d4; }
body { margin: 0; color: var(--ink); font: 11.5pt/1.45 "Helvetica Neue", Arial, system-ui, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.toolbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 10px 16px; background: #1d2416; }
.toolbar a, .toolbar button { font: 600 15px/1 system-ui, sans-serif; min-height: 44px; padding: 12px 16px; border-radius: 8px; border: 2px solid #fff; background: transparent; color: #fff; text-decoration: none; cursor: pointer; }
.toolbar .primary { background: #fff; color: #1d2416; }
.sheet { width: 210mm; min-height: 297mm; margin: 16px auto; padding: 14mm 15mm; background: #fff; box-shadow: 0 2px 12px rgb(0 0 0 / .18); }
@media screen and (max-width: 820px) { .sheet { width: auto; min-height: 0; margin: 12px; padding: 18px 16px; } }
h1 { font-size: 22pt; line-height: 1.15; margin: 0 0 4mm; }
h2 { font-size: 14.5pt; margin: 6mm 0 2mm; padding: 1.5mm 3mm; background: var(--ink); color: #fff; }
h3 { font-size: 12pt; margin: 4mm 0 1.5mm; }
p, ul, ol { margin: 0 0 2.5mm; }
ul, ol { padding-left: 6mm; }
li { margin-bottom: 1mm; }
.lead { font-size: 12.5pt; }
.small { font-size: 9.5pt; color: var(--mute); }
.box { border: 2px solid var(--ink); padding: 3mm 4mm; margin: 3mm 0; break-inside: avoid; }
.box--warn { border-width: 3px; border-style: double; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 7mm; }
@media screen and (max-width: 820px) { .cols { grid-template-columns: 1fr; } }
.cols > * { min-width: 0; }
.avoid { break-inside: avoid; }
.page-break { break-before: page; }
table { width: 100%; border-collapse: collapse; margin: 2mm 0 3mm; font-size: 10.5pt; }
th, td { border: 1px solid var(--line); padding: 1.6mm 2mm; text-align: left; vertical-align: top; }
thead th { background: var(--soft); }
.fill td, td.fill { height: 9mm; }
.big-num { font-size: 20pt; font-weight: 800; white-space: nowrap; }
.freq { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.line { display: flex; gap: 2mm; align-items: flex-end; margin: 2.5mm 0; }
.line span { white-space: nowrap; }
.line i { flex: 1; border-bottom: 1px solid var(--ink); min-height: 6mm; }
.check { list-style: none; padding: 0; }
.check li::before { content: "☐  "; font-size: 13pt; }
.cover { display: flex; flex-direction: column; justify-content: space-between; }
.cover .title { font-size: 34pt; line-height: 1.05; margin: 18mm 0 6mm; }
.foot { margin-top: 6mm; padding-top: 2mm; border-top: 1px solid var(--line); font-size: 8.5pt; color: var(--mute); }
/* Tessere formato carta di credito (85,6 × 54 mm) */
.cards { display: grid; grid-template-columns: repeat(2, 85.6mm); gap: 6mm; justify-content: center; }
.card { width: 85.6mm; height: 54mm; border: 1px dashed var(--ink); padding: 3mm 3.5mm; font-size: 7.6pt; line-height: 1.3; overflow: hidden; break-inside: avoid; }
.card h3 { font-size: 9pt; margin: 0 0 1.2mm; }
.card .line { margin: 1.3mm 0; } .card .line i { min-height: 3.5mm; }
.card table { font-size: 7.2pt; margin: 0; } .card td, .card th { padding: .5mm 1mm; }
@media screen and (max-width: 820px) { .cards { grid-template-columns: 1fr; } }
@page { size: A4; margin: 0; }
@media print {
  html { background: #fff; }
  .toolbar { display: none; }
  body { font-size: 10.5pt; line-height: 1.36; }
  .sheet { margin: 0; box-shadow: none; width: auto; min-height: 0; padding: 8mm 13mm 6mm; break-after: page; }
  h2 { margin: 4mm 0 1.5mm; font-size: 13pt; }
  h3 { margin: 3mm 0 1mm; }
  li { margin-bottom: .6mm; }
  th, td { padding: 1.2mm 1.8mm; }
  .fill td, td.fill { height: 7.4mm; }
  .foot { margin-top: 3mm; }
  .dense th, .dense td { padding-block: .7mm; }
  .sheet:last-of-type { break-after: auto; }
  a { color: var(--ink); text-decoration: none; }
}
/* Telefoni molto stretti: le tabelle dei moduli restano dentro lo schermo */
@media screen and (max-width: 480px) {
  table { font-size: 9pt; }
  th, td { padding: 4px; overflow-wrap: anywhere; }
}
