@layer base {
  html { scroll-behavior: smooth; }

  body {
    background: var(--color-bg);
    color: var(--color-ink);
    font-family: var(--font-body);
    line-height: 1.5;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  a { color: var(--color-ink); }
  a:hover { color: var(--color-accent-text); }
  ::selection { background: var(--color-accent-soft); }
  :focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
  h1, h2, h3 { font-family: inherit; }
  [id] { scroll-margin-top: 90px; }

  /* "Salta al contenuto": fuori schermo finché non riceve il focus da tastiera */
  .skip-link {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
    &:focus {
      position: fixed; left: 16px; top: 16px; z-index: 100; width: auto; height: auto; clip-path: none;
      padding: 12px 20px; background: var(--color-ink); color: #fff; font-weight: 600; text-decoration: none;
    }
  }
}
