/* ==================================================================
 * Base comune a ogni demo. I colori, i font e le forme stanno in
 * demo.css, scritto dal design.md della demo: qui solo quello che vale
 * per tutti.
 * ================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img, svg, picture { display: block; max-width: 100%; height: auto; }
input, textarea, select, button { font: inherit; font-size: max(16px, 1em); }

/* Tipografia (skill tipografia-web) */
h1, h2, h3, h4, .titolo { text-wrap: balance; hyphens: none; overflow-wrap: normal; }
p, li, blockquote, figcaption, dd { text-wrap: pretty; hyphens: manual; }
p { max-width: 65ch; }
.cl { display: block; }
.ph { white-space: nowrap; }
button, .btn, .badge, .tag, .chip, time, .prezzo, .orario { white-space: nowrap; }
.url, .email, code { overflow-wrap: anywhere; }

/* La correzione che evita quasi tutti gli sforamenti */
.griglia > *, .riga > *, .stack > * { min-width: 0; }

/* Accessibilità */
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.salta { position: absolute; left: 8px; top: -64px; padding: 12px 16px; background: #fff; color: #000; z-index: 100; }
.salta:focus { top: 8px; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
