/* base.css – reset e base */
*, *::before, *::after { box-sizing: border-box; }

/* Spazio laterale minimo pagina (allineato al container su mobile); layout usa max(..., safe-area). */
:root {
	--space-x: 1.5rem;
}

html {
	scroll-behavior: smooth;
	/* Salto ai fragment (#nota, ↩ verso riferimento): il target non finisce sotto header fisso (--header-height da main.js). */
	scroll-padding-top: var(--header-height, 10.5rem);
	overflow-x: hidden;
	width: 100%;
	min-width: 0;
	/* Riserva spazio alla scrollbar: il contenuto non arriva mai sotto la scrollbar (fix “taglio” a destra) */
	scrollbar-gutter: stable;
}
body {
	margin: 0;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow-x: hidden;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	line-height: 1.6;
	color: #1a1a1a;
	background: #fff;
	/* Blocco copia testo: nessuna selezione sul sito pubblico */
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}
img { max-width: 100%; height: auto; display: block; }
/* Contenuto pagine e articoli: niente overflow laterale, parole lunghe e tabelle gestite */
.page-content,
.article-content {
	max-width: 100%;
	overflow-wrap: break-word;
	word-break: break-word;
	min-width: 0;
}
.page-content table,
.article-content table {
	display: block;
	overflow-x: auto;
	max-width: 100%;
}
.page-content iframe,
.article-content iframe {
	max-width: 100%;
}
.page-content pre,
.article-content pre {
	overflow-x: auto;
	max-width: 100%;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.reading-progress {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 4px;
	background: rgba(0, 0, 0, 0.12);
	z-index: 9999;
}
.reading-progress-fill {
	display: block;
	height: 100%;
	width: 0%;
	background: #c00;
	transition: width 0.1s ease;
}
