/* Base: reset leggero, tipografia, link, focus */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

h1, h2, h3, h4 {
  margin: 0 0 var(--space-4);
  color: var(--color-secondary);
  font-family: var(--font-display);
  line-height: 1.15;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); font-weight: 600; margin-top: var(--space-6); }
h3 { font-size: var(--fs-h3); font-weight: 600; margin-top: var(--space-5); }
h4 { font-size: var(--fs-h4); font-weight: 600; margin-top: var(--space-4); }

p, ul, ol, dl, table { margin: 0 0 var(--space-4); }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: var(--space-2); }
li > p { margin: 0; }
strong, b { font-weight: 700; }

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

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; display: block; }

hr { border: 0; border-top: 1px solid var(--color-rule); margin: var(--space-6) 0; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--color-rule); }
th { color: var(--color-secondary); font-weight: 700; }
thead th { border-bottom: 2px solid var(--color-secondary); }
caption { padding-bottom: var(--space-2); text-align: left; font-weight: 700; color: var(--color-secondary); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
